------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:/Users/silvio/Documents/CVR/ryp/output/s2_dokrig.log
  log type:  text
 opened on:   4 Jul 2018, 12:55:28

. 
. matrix drop _all

. set more off

. 
. set matsize 1392

. scalar nstrata=58                      /*=58, CVR strata*/

. scalar signi=2

. 
. 
. use "${data}/${datafile}" , replace

. 
. 
. sort i perpe k

. ren y yy

. mkmat yy

. 
. forval perpel= 1/3{            /*Original*/
  2. scalar perpeh=`perpel'
  3. do "$code/cvrkrigrun"
  4. matrix list mao
  5. matrix list sum_mao
  6. matrix list modelmat
  7. 
. di "perpe:  " perpeh
  8. di "depmean:  " depmean 
  9. di "depvar:  " depvar
 10. di "depvar1:  " depvar1
 11. di "depvar2:  " depvar2
 12. di "nlags:  " nlags
 13. di "nstrata:  " nv
 14. di "nestim:  " nestim
 15. di "nestimratio:  " nestim2
 16. di "nestime:  " nestime
 17. di "nestimv:  " nestimv
 18. 
. 
. if perpeh==1{
 19. matrix mao_est=mao
 20. matrix sum_est=sum_mao
 21. matrix modelmat_e=modelmat
 22. }
 23. else if perpeh==2{
 24. matrix mao_sl=mao
 25. matrix sum_sl=sum_mao
 26. matrix modelmat_s=modelmat
 27. }
 28. else if perpeh==3{
 29. matrix mao_ot=mao
 30. matrix sum_ot=sum_mao
 31. matrix modelmat_o=modelmat
 32. }
 33. }

. * This program estimates total population analytically and performs the kriging geographical interppolation
. scalar diestim=0

. scalar nestim=0

. scalar nestime=0

. scalar nestimv=0

. ******************************
. matrix mao=J(nstrata,3,0)

. matrix modelmat=J(7, 1, 0)

. forval ii = 1/58{   /* begin loop strata */
  2. scalar jhat=`ii'
  3. scalar jj1=(jhat-1)*8*3+(perpeh-1)*8+1
  4. scalar jj2=jj1+6
  5. 
. matrix a=yy[jj1..jj2,1]              /*original data*/
  6. run "$code\analya"
  7. matrix mao[jhat,1]=ntotalm
  8. if modeli>0 & (perpeh~=2 | jhat~=57) & (perpeh~=3 | jhat~=52) {           /* Original*/
  9. matrix modelmat[modeli,1]=modelmat[modeli,1]+1
 10. matrix mao[jhat,2]=nmv[modeli, 1]
 11. matrix mao[jhat,3]=nmv[modeli, 2]
 12. scalar diestim=diestim+1
 13. scalar nestim=nestim+mao[jhat,1]
 14. scalar nestime=nestime+mao[jhat,2]
 15. scalar nestimv=nestimv+mao[jhat,3]
 16. 
. matrix reportmo=nmv,prm,chi2ml,dfml
 17. 
. forval ii= 1/7{
 18. matrix reportmo[`ii',2]=sqrt(reportmo[`ii',2])
 19. matrix reportmo[`ii',4]=reportmo[`ii',4]/reportmo[`ii',5]
 20. }
 21. 
. di perpeh,jhat
 22. matrix reportmo=reportmo[1..7,1..4]
 23. matrix list reportmo
 24. }
 25. 
. 
. } /* end loop strata*/
1 1

reportmo[7,4]
           c1         c2         c1         c1
r1  562.98946  31.052392  3.079e-06   9.447284
r2  577.11111  36.705655  1.408e-06  13.473323
r3  501.97183  30.891007  .00001112  11.407041
r4  660.69565  53.030404  .00995334  4.6098475
r5   767.3125  90.817646  .09310157   2.819911
r6  499.76471  35.665956  1.624e-06  22.995793
r7  665.84615   102.1425  .00242233   9.198355
1 2

reportmo[7,4]
           c1         c2         c1         c1
r1  52.888322  6.6109434  .16934753  1.6778931
r2         48  4.7067872  .35751733  1.0285714
r3         80  38.987177  .08576534  2.4561404
r4         54  7.3484692  .07642629  2.5714286
r5  48.545455  5.1484353  .24821308  1.3333333
r6         48  8.4852814  .15149399  2.0571429
r7          0          0          0          .
1 3

reportmo[7,4]
           c1         c2         c1         c1
r1  31.377055  1.9735482  .01778209  3.3647355
r2         32  2.7174649  .00673795          5
r3  33.230769  3.2885783  .01637682  4.1118881
r4  32.857143  3.0087336  .01701403  4.0737168
r5         38   9.486833  .00623701  7.4805195
r6         44  18.973666  .00908747  6.8055556
r7         44  14.491377  .02927251  4.7515152
1 4

reportmo[7,4]
           c1         c2         c1         c1
r1  69.123526     5.5718   .0427214  2.7216761
r2     76.375  9.6169305  .06481099  2.7362801
r3  66.444444  5.9044751  .01990889  3.9165889
r4  72.380952  7.2810517    .047333  3.0505475
r5         95  23.392306  .22143268  1.4950622
r6         82  22.912878  .02141081  5.2930403
r7  70.571429  9.2959128   .0142825   6.002886
1 5

reportmo[7,4]
           c1         c2         c1         c1
r1  176.75669  44.097707  .03940026  2.7815602
r2        171  49.425268  .01272011  4.3645714
r3        189  74.669271  .01453575  4.2311441
r4  205.71429  62.920191  .14134922  1.9565217
r5      214.5  85.233136  .05429183  3.7037037
r6        183  122.96341  .00339106   8.584127
r7        399  352.11362  .11465264  2.4888889
1 6

reportmo[7,4]
           c1         c2         c1         c1
r1  24.349968  2.1058479  .23574974  1.4165093
r2       25.5  2.9874738  .32465247      1.125
r3         22          0          .          .
r4         24  2.1908902  .14821507  1.9090909
r5       25.5   3.799671   .1336144       2.25
r6         22          0          .          .
r7         22          0          .          .
1 7

reportmo[7,4]
           c1         c2         c1         c1
r1  41.985395  1.6855669  .03652693  2.8374873
r2      44.55  3.1835711  .22770336  1.4797115
r3      41.76  1.7146148  .01476829  4.2152727
r4  42.285714    2.14535  .01326429  4.3226797
r5         61  25.922963  .44898364  .57321637
r6       45.6  4.9185364  .08968602       2.88
r7         42   2.236068  .00348344  8.5351974
1 8

reportmo[7,4]
           c1         c2         c1         c1
r1  24.685066  1.6826411  .08505582  2.2065994
r2  24.923077  1.9201161  .02837526  3.5622378
r3       29.4  6.1344926  .13275755  2.0192308
r4  24.615385  1.7489186  .03926068  3.2375317
r5     24.875  2.0468154  .00815097          7
r6          0          0          0          .
r7          0          0          0          .
1 9

reportmo[7,4]
           c1         c2         c1         c1
r1  298.34584  25.842412  1.076e-06  10.171065
r2   289.4878  27.161641  8.455e-08  16.285896
r3  303.63636  40.464527  2.124e-07  15.364799
r4        351  41.396931   .0007161  7.2416929
r5      359.3  52.751299  .00017641  14.067036
r6      279.5  43.812455  1.008e-08  32.826101
r7       1679   1544.158  .01642786  5.7564902
1 10

reportmo[7,4]
           c1         c2         c1         c1
r1  20.310938  1.4351489  .22652583   1.448382
r2         19          0          .          .
r3      21.25  2.4447009  .12520814  2.0777778
r4  20.363636  1.5888416  .11283619  2.1818182
r5         19          0          .          .
r6         19          0          .          .
r7         22  3.8729833  .04550026          4
1 11

reportmo[7,4]
           c1         c2         c1         c1
r1  958.02587  33.117159  1.632e-14  22.426548
r2  985.74847  43.350464  3.220e-15  33.374505
r3  886.87234  31.614678  6.417e-14  30.377311
r4  1111.2632   56.47561  3.431e-06  12.582788
r5  1552.0909   183.0064  .05460619  3.6940707
r6  876.97101  38.598151  5.329e-15  61.158122
r7  1062.3103  71.488197  5.943e-07   24.93073
1 12

reportmo[7,4]
           c1         c2         c1         c1
r1  188.96994  12.606879  4.083e-07  10.837193
r2     200.85  17.335565  2.895e-07   15.05505
r3        171  11.051826  2.250e-07  15.307292
r4  232.25806  26.148103  .00027147  8.2116732
r5      452.6  157.01526  .09732816  2.7487883
r6    176.625  15.262834  7.518e-08  28.926421
r7  228.85714  43.513344   .0000491  16.482503
1 13

reportmo[7,4]
           c1         c2         c1         c1
r1       16.8  4.2787217  .06424687  2.4177778
r2         18          6  .03421812      3.375
r3  14.666667  3.6106837  .02706876   3.609375
r4       24.5  12.374369  .15463826  1.8666667
r5          0          0          0          .
r6         15  4.8989795  .00815097          7
r7          0          0          0          .
1 14

reportmo[7,4]
           c1         c2         c1         c1
r1  1940.0775  59.750579          0  46.316454
r2  1521.7191  41.167176  1.547e-13  29.497604
r3  2035.3846  77.910351          0  71.317564
r4  2248.5556  93.918702  3.827e-09  19.381237
r5       1708  79.882841  .00228825  9.3026301
r6  1459.1111  37.425401  6.328e-14  56.264286
r7  2762.0561  185.94664  .00953874  6.7190686
1 15

reportmo[7,4]
           c1         c2         c1         c1
r1  90.248739  9.4424633  .06900913  2.3641457
r2         96  12.220202  .12766416  2.0583522
r3  81.529412  8.0551225  .05319714  2.9337506
r4      103.7  19.240816  .04850336  3.0261222
r5        152  60.332413  .82326068  .04988662
r6         86  11.144505  .09213289  2.8367063
r7       85.5  16.601958  .01751707  5.6438127
1 16

reportmo[7,4]
           c1         c2         c1         c1
r1  36.742068  6.6206044  .00124636  5.2665918
r2         30  4.8989795  .00073018  7.2222222
r3         42  10.583005  .00298995     5.8125
r4         48  14.532722  .02472353        3.7
r5          0          0          0          .
r6         34         12  .00061391  11.733333
r7        114  97.488461  .12133525        2.4
1 17

reportmo[7,4]
           c1         c2         c1         c1
r1  60.626327  7.3373678  4.438e-06  9.1950127
r2       57.2  7.6383244  1.538e-06  13.385105
r3         54  6.1481705  2.552e-06  12.878667
r4         78  17.385339  .31140322  1.1666667
r5        140  109.10545  .31049443  1.0285714
r6         49  2.5819889  2.500e-07  26.601861
r7        109  77.149206  .16426437  1.9345238
1 18

reportmo[7,4]
           c1         c2         c1         c1
r1  24.325907  5.3837898  .02114821  3.2384216
r2         27  8.2158384  .01499558        4.2
r3         26  7.6485293    .010631  4.5439815
r4  30.333333  11.610978  .01243177     4.3875
r5          0          0          0          .
r6         37  24.494897  .00815097          7
r7          0          0          0          .
1 19

reportmo[7,4]
           c1         c2         c1         c1
r1  225.44898   16.48283          0  36.657153
r2  196.21875  13.154191          0  50.121882
r3  205.16129   15.68239          0  51.416068
r4  306.52174  42.966076  .02384905  3.7360108
r5  443.33333  192.39812  .01318437  6.1442006
r6  173.72727  4.1279316          0  103.71823
r7        699  418.60483   .0794023  3.0770936
1 20

reportmo[7,4]
           c1         c2         c1         c1
r1   386.1631  9.3746288          0  26.199379
r2  397.95973  12.334183          0  40.338122
r3  356.80233  5.7254565  6.087e-11  23.522274
r4    440.375  19.767006  3.499e-09  19.470811
r5      743.5  136.25459  .02133942  5.2988569
r6     358.25  6.4981969  7.762e-12  46.824982
r7        377  12.788388  1.112e-06  23.724557
1 21

reportmo[7,4]
           c1         c2         c1         c1
r1  71.930806   2.443468  .00018776   6.596193
r2       70.5  2.0485186   .0006116  7.3994318
r3  70.086957  1.7831849  .00229309  6.0778533
r4  83.136364  7.5630148  .56376254  .57312215
r5       90.5  20.811655  .34888732      .8775
r6  69.153846  1.3012371  .00573981  7.6302273
r7         77  6.7082039  .74054453  .10964862
1 22

reportmo[7,4]
           c1         c2         c1         c1
r1  72.784101  2.7525336  .00618712   4.126837
r2  75.777778  4.6721504  .00222829  6.1065194
r3  69.534884  1.5754509  .07430135  2.5996261
r4       75.6  4.0516663  .00730949  4.9185822
r5        110  36.660606  .05369108  3.7222777
r6       69.8  1.9349419  .02304781  5.1648981
r7  70.333333  2.1998878  .08469473  2.9724265
1 23

reportmo[7,4]
           c1         c2         c1         c1
r1  269.49758  19.311273          0  48.401071
r2  231.52941  14.883385          0  58.136726
r3  225.16667  12.793077          0  56.514103
r4      370.5  51.454166  .49068635  .71195015
r5        542  239.09552  .72562452  .12316716
r6      201.8  2.3977767          0  102.66107
r7      375.4   108.6169  .23334574  1.4203504
1 24

reportmo[7,4]
           c1         c2         c1         c1
r1  42.261262   3.679851  .00450687  4.3536134
r2         42  4.5825757  .00151437  6.4927536
r3  39.272727  2.8485435  .00267545  5.9236364
r4  46.545455  6.3553665  .64638263  .43636364
r5         58  21.977261          1          0
r6         38  1.7320508  .00066158  11.594203
r7         44  8.6409876  .38647623        .75
1 25

reportmo[7,4]
           c1         c2         c1         c1
r1  1224.3049  31.811204          0  63.694677
r2  1318.7016  43.056439  .00001592  11.048082
r3  983.74194    17.1304          0  71.089886
r4  1269.0556  38.359165          0  81.301669
r5  1413.3462  57.535617  .22536834  1.4698565
r6     1266.2  227.63086  2.673e-06  22.038374
r7  984.41176  18.707906          0  141.55108
1 26

reportmo[7,4]
           c1         c2         c1         c1
r1  209.45602  17.962279          0  42.081465
r2  161.45833   6.059749          0  47.739458
r3  196.40909  18.993675          0  57.448236
r4   286.6875  48.390645  .05224324  2.9518448
r5        197  47.916594  .03072641  4.6681834
r6  156.77778  1.2394963          0  98.990485
r7       1017   924.1818  .50403587  .44642857
1 27

reportmo[7,4]
           c1         c2         c1         c1
r1  77.610882  8.0666261  6.022e-06  8.9844163
r2  78.166667  11.508652  1.417e-06  13.467122
r3  78.166667  11.508652  1.417e-06  13.467122
r4       82.5  12.228297  .43459821  .83333333
r5         97  36.124784  .21231716  1.5555556
r6          0          0          0          .
r7         97  36.124784  .21231716  1.5555556
1 28

reportmo[7,4]
           c1         c2         c1         c1
r1  202.26507  14.759759          0  26.580994
r2  170.47059  9.4063566  3.742e-12  26.311316
r3  176.77551   10.87396  3.281e-13  28.745556
r4  433.71429  94.737692  .19265216   1.646869
r5        456  200.09998  .07240397  3.2276625
r6  154.42105  4.9242698  7.748e-11  42.320464
r7       1288  1180.9047  .52217974  .40958595
1 29

reportmo[7,4]
           c1         c2         c1         c1
r1  62.018998  7.2279444  .00143135  5.1687586
r2  62.428571  8.2945062  .00046801  7.6670194
r3         55   6.992059  .00096246  6.9460227
r4         75  13.816986  .14674439  1.9190631
r5       86.6  24.469409  .08676817  2.9333333
r6         53  6.3245553   .0001283  14.666667
r7          0          0          0          .
1 30

reportmo[7,4]
           c1         c2         c1         c1
r1  82.611898  6.3214334  5.242e-13  20.077505
r2  76.461538  5.1226202  1.499e-11   24.92339
r3         72          0          .          .
r4  94.916667  13.463449   .4174414  .87361111
r5        127  78.485667  .24290826  1.3636364
r6         72          0          .          .
r7         72          0          .          .
1 31

reportmo[7,4]
           c1         c2         c1         c1
r1  257.99694   23.41931  7.556e-09  13.567969
r2  257.35294  27.005834  1.444e-09  20.355794
r3      208.6  18.192819  7.360e-08  16.424583
r4     354.75  53.515112  .03998783    3.21918
r5      498.5  138.77534  .17039805  1.8794379
r6  191.85714  14.306108  2.488e-09  35.548353
r7        386  133.32292  .01230951  6.2657343
1 32

reportmo[7,4]
           c1         c2         c1         c1
r1  413.63357  7.8112126          0  44.395821
r2  411.28495  8.5790434          0  65.952933
r3  396.87766   6.312821          0  58.699207
r4  469.72603  17.178774  .00030442  8.0970972
r5      599.4  65.739851  .17004348  1.8825599
r6   391.8871  5.5574006          0  113.78684
r7  481.09091  34.505904  .00006167  16.050649
1 33

reportmo[7,4]
           c1         c2         c1         c1
r1  106.13793  8.2785903  6.479e-12  18.372762
r2    102.125  9.1528364  1.804e-12  27.040871
r3     97.875  7.3681775  3.431e-12  26.398177
r4      124.2  17.072082  .23333091  1.4552976
r5        188  91.733309  .26053083  1.2659341
r6         91  2.5819889  1.972e-13  54.032478
r7        155  66.992537  .11121906  2.5368132
1 34

reportmo[7,4]
           c1         c2         c1         c1
r1  91.887359  12.863894  5.972e-07  10.575954
r2       76.7  10.618333  1.941e-06  13.152539
r3  81.846154  11.178039  3.338e-07  14.912676
r4        132  33.985291  .27893243  1.2767857
r5          0          0          0          .
r6       65.6  3.5597753  1.273e-07  27.906977
r7        142  58.651513  .11846489     2.4375
1 35

reportmo[7,4]
           c1         c2         c1         c1
r1  523.20053  15.169061          0  35.626852
r2  504.64286  16.580761          0  51.796961
r3  505.97826  16.017988          0  52.340072
r4  590.54545  26.294676  .01019026   4.586323
r5  679.23077  68.681102  .02023522  5.3914866
r6  471.84375  12.335352          0  100.56892
r7  634.63158  49.966493  .00592549  7.5728219
1 36

reportmo[7,4]
           c1         c2         c1         c1
r1  874.01574  33.800445          0  97.932021
r2  756.54545  27.665919          0  120.37922
r3  765.24113  27.784475          0  123.17669
r4  1194.9588   83.94077  .08437759  2.4724534
r5  1494.7647  258.96435  .14466702   2.127601
r6  652.40984  9.1961989          0  210.03632
r7  1295.3077  170.50611  .03870583  4.2737322
1 37

reportmo[7,4]
           c1         c2         c1         c1
r1    535.798  9.0314854          0  31.787327
r2  534.36398  9.6372679          0   47.13819
r3  523.09962  8.2669764          0  40.941902
r4  615.62338   22.49853  .00015258  8.7878481
r5  749.86957  70.553006   .0357475  4.4091092
r6  519.76923  8.2958495          0  79.642931
r7  652.04348  46.956784  .00005878  16.141597
1 38

reportmo[7,4]
           c1         c2         c1         c1
r1  22.660991  4.3088636  .04695916  2.6515365
r2  18.666667  2.2771002  .05321934  2.9333333
r3       22.4  4.9185364  .01994424  3.9148148
r4  33.333333  13.471506  .38582131  .95238095
r5         24  10.583005  .20590321        1.6
r6         18  1.6329932   .0157253  5.8333333
r7          0          0          0          .
1 39

reportmo[7,4]
           c1         c2         c1         c1
r1  32.401613  .68716517  .06524375  2.4062395
r2  33.142857  1.3430163  .22661022  1.4845238
r3  32.666667  .95257934  .04255905  3.1568627
r4         32          0          .          .
r5         32          0          .          .
r6         35  3.2403703  .61915371  .24705882
r7         32          0          .          .
1 40

reportmo[7,4]
           c1         c2         c1         c1
r1  151.03728   5.060437  1.865e-14   22.33538
r2  139.57627  2.4687413  2.481e-12  26.722389
r3   149.1875  5.3300778  5.773e-15  32.775145
r4     173.04  11.168135  .17403339  1.7485081
r5      158.2  18.554999  .08207026  3.0234193
r6  138.36842  1.5960295  9.137e-13  51.021191
r7      205.9  31.596851  .72895731  .12007118
1 41

reportmo[7,4]
           c1         c2         c1         c1
r1  111.09277   4.210822  1.228e-13  21.060572
r2  108.89796  4.1895683  4.796e-14  30.668042
r3  105.79592  3.2178982  3.493e-13  28.682911
r4  133.82353  11.366308  .00996587  4.6085886
r5        263  130.11149  .07652542  3.1371926
r6  103.64706  2.2889215  1.328e-13  54.809449
r7        191  77.362782  .00613584  7.5099688
1 42

reportmo[7,4]
           c1         c2         c1         c1
r1   58.80083  2.4899345  .00001972  8.1638166
r2  56.454545  1.9319762  .00001697  10.984091
r3       57.8  2.3226422  6.559e-06  11.934694
r4  64.166667  4.9505658  .30447559  1.1891644
r5          0          0          0          .
r6  55.666667  1.1385501  4.708e-06  20.952381
r7         65  7.2456884  .12214407  2.3896104
1 43

reportmo[7,4]
           c1         c2         c1         c1
r1  84.430486   2.906008  8.288e-08  11.930537
r2  81.302326  2.0864147  2.279e-07  15.294251
r3  85.272727  3.4866387  1.333e-08  18.133223
r4  96.419355  7.3606691  .01400193  4.2685602
r5        106  25.980762   .0039856  8.2903654
r6       81.4  2.2768399  3.063e-08  30.667241
r7        151  50.199602  .31115095   1.025784
1 44

reportmo[7,4]
           c1         c2         c1         c1
r1  61.766187  11.116758  1.948e-07  11.345066
r2         48  5.8554004  1.877e-06  13.185882
r3  54.666667   10.31001  5.062e-07  14.496429
r4       92.5  33.833231  .43459821  .83333333
r5         76  47.370877  .20590321        1.6
r6  43.666667  1.2171612  2.105e-07  26.933824
r7          0          0          0          .
1 45

reportmo[7,4]
           c1         c2         c1         c1
r1  424.40951  11.905461          0  34.168965
r2  418.43182  13.374803          0   50.47558
r3  397.21168  10.104017          0  45.268343
r4  489.93103  23.244833  .00775122  4.8599054
r5  610.18182  71.184383  .33998432  .91049047
r6  383.76744   8.042287          0  87.311815
r7  486.44444  38.130045  .00183889  9.7037798
1 46

reportmo[7,4]
           c1         c2         c1         c1
r1  106.77892  13.728925  2.884e-10  15.793678
r2    85.3125  9.0358579  1.417e-09  20.374681
r3    95.3125   12.27955  2.297e-10  22.194196
r4  201.42857  61.497351  .01841545  3.9945652
r5          0          0          0          .
r6         75  3.9440532  7.099e-12         47
r7          0          0          0          .
1 47

reportmo[7,4]
           c1         c2         c1         c1
r1  115.06215  8.2887406  .00325567  4.5855832
r2        108  7.0442616  .00161118  6.4307863
r3  119.57143  12.754694  .00083349  7.0898842
r4  130.46154  14.071538   .0173082   4.056575
r5   119.6875  12.610072  .00801787  7.0294785
r6  106.45455   8.666108  .00034669  12.799642
r7          0          0          0          .
1 48

reportmo[7,4]
           c1         c2         c1         c1
r1  173.72626  8.5505812  4.564e-11  17.047149
r2      149.5  3.9102139  2.138e-08   17.66082
r3  173.07692  9.6670211  9.019e-12  25.431682
r4  203.80952  16.893181  .14839678  1.9078656
r5  166.66667  18.489236  .15665812   2.006192
r6      147.5  2.5155765  4.756e-09  34.286877
r7  237.85714  35.672424  .36758235  .81182122
1 49

reportmo[7,4]
           c1         c2         c1         c1
r1  35.686645  7.9445764  .04435322  2.6938972
r2       34.2  8.7525996  .01997857  3.9130952
r3         30  5.9160798  .02342702  3.7538652
r4  56.333333  25.018512  .36513067     1.0075
r5          0          0          0          .
r6         27  4.3204938   .0050018  7.8787879
r7         53  36.331804  .15149399  2.0571429
1 50

reportmo[7,4]
           c1         c2         c1         c1
r1  56.627339  12.092184  .00128132  5.2470417
r2  39.666667  5.5544443  .00698098  4.9645661
r3         55  13.540064  .00050863  7.5837862
r4       84.5  32.337092  .57481691   .5537037
r5         57  31.811947  .38691632  .74861111
r6  36.666667  2.4343225  .00148474  10.097459
r7        145  123.20714  .80914983  .05833333
1 51

reportmo[7,4]
           c1         c2         c1         c1
r1  171.65817  17.257787  .05530893  2.5297516
r2        164  17.312543  .04384423  3.1271122
r3     148.96  15.039311  .20410651  1.5891133
r4  200.57143  29.248907  .44212377  .81616541
r5        198  35.573228  .20003171  1.6421429
r6  136.13333  11.731111  .74466187  .10607143
r7  172.28571  31.631995  .37240709  .79561688
1 52

reportmo[7,4]
           c1         c2         c1         c1
r1  242.75458  18.418661  7.338e-07  10.434398
r2    231.875  24.450005  2.482e-07  15.209077
r3      237.6  20.038563  1.037e-07  16.081489
r4        280  29.249881  .02643261   3.633157
r5        500  218.49485  .06432437  3.4222222
r6  210.85714  22.255081  1.491e-08  32.064871
r7  293.15789  40.906944  .00870774  6.8818083
1 53

reportmo[7,4]
           c1         c2         c1         c1
r1  101.59416  3.5124004  .01246028  3.6227368
r2  104.21277  4.7586441  .01029642   4.575959
r3      102.5  4.2604039  .00492443  5.3135458
r4  105.42857  5.3561224   .0138053  4.2827029
r5  119.71429   14.81076  .04166967  4.1485714
r6  107.84615  7.5730399  .00340445  8.5769483
r7        112  10.606602  .00690782  7.2967819
1 54

reportmo[7,4]
           c1         c2         c1         c1
r1  21.440014  2.2158217  .11327744   1.988658
r2         21  2.6457513  .05541765  2.8928571
r3  20.777778  2.0258955  .05247315  2.9474537
r4         24  4.1403934  .45449361  .78857143
r5          0          0          0          .
r6         20  1.7320508  .01796048        5.6
r7  23.666667  5.0917508  .21231716  1.5555556
1 55

reportmo[7,4]
           c1         c2         c1         c1
r1  49.009857  1.1216262  .00780489   3.960078
r2  48.807692  1.2313469   .0029779  5.8165369
r3  49.636364  1.5688554  .00786542  4.8452789
r4  50.258065  1.9133314  .06783372  2.6906959
r5         55  10.583005  .02823413  4.8137143
r6         50  2.8284271  .00176161  9.7827053
r7      53.25  4.1504894  .14548977   2.118913
1 56

reportmo[7,4]
           c1         c2         c1         c1
r1  84.809155  12.629914  .29902045  1.2242992
r2       91.2  23.855565  .15452949  1.8673703
r3       78.4  12.010662  .19135533  1.6536232
r4  89.818182  15.603656  .63754033  .45013774
r5      121.5  57.494565  .92265025  .00942761
r6         72  15.491933  .07203616  3.2360034
r7  83.428571  15.888827  .46520882  .53333333
1 57

reportmo[7,4]
           c1         c2         c1         c1
r1  372.44188  74.906082  .00038288  6.0973326
r2      324.5  70.825343  .00026032   8.253589
r3  296.33333  71.974618  .00080813  7.1207936
r4  527.44444  150.87996  .73513558  .30770034
r5      525.4  197.43361    .431923  .61764706
r6      189.4  29.850829   .0005385  11.977392
r7        691   426.1549  .59155774  .28791813
1 58

reportmo[7,4]
           c1         c2         c1         c1
r1  85.806755   5.807438  .12348635     1.9225
r2  90.296296  7.8223038  .14790874  1.9111598
r3  84.903226  5.9447062   .0513957  2.9682007
r4  89.333333  10.160198  .05665318  2.8708072
r5        167  106.77078  .42061884  .64858554
r6  89.882353  8.5737661  .05096194  3.8095238
r7         88  11.593101  .01577619  5.8276496

. 
. matrix list mao

mao[58,3]
            c1         c2         c3
 r1        367   767.3125  8247.8448
 r2         42         48  22.153846
 r3         29  31.377055  3.8948923
 r4         57         95      547.2
 r5         71  205.71429  3958.9504
 r6         22       25.5      8.925
 r7         40         61        672
 r8         23       29.4     37.632
 r9        185       1679    2384424
r10         19  20.310938  2.0596523
r11        675  1552.0909  33491.342
r12        141      452.6  24653.792
r13         12       24.5    153.125
r14       1260  2762.0561  34576.153
r15         68         96  149.33333
r16         26        114       9504
r17         47        140      11904
r18         17  24.325907  28.985192
r19        168        699     175230
r20        341      743.5  18565.313
r21         68       90.5    433.125
r22         68  69.534884  2.4820456
r23        199      370.5  2647.5313
r24         37         44  74.666667
r25        956  1413.3462  3310.3472
r26        156   286.6875  2341.6545
r27         68       82.5  149.53125
r28        144  433.71429  8975.2303
r29         47         75  190.90909
r30         72  94.916667  181.26447
r31        161      498.5  19258.594
r32        378      599.4   4321.728
r33         89        188       8415
r34         62        132       1155
r35        436  590.54545  691.40997
r36        623  1494.7647  67062.536
r37        489  749.86957  4977.7266
r38         17  33.333333  181.48148
r39         32  33.142857  1.8036929
r40        137     173.04  124.72723
r41        101        263      16929
r42         55  64.166667  24.508102
r43         79        151       2520
r44         43       92.5  1144.6875
r45        362  610.18182  5067.2164
r46         70  201.42857  3781.9242
r47         91  130.46154  198.00819
r48        145  237.85714  1272.5219
r49         23  56.333333  625.92593
r50         35         57       1012
r51        111  172.28571  1000.5831
r52        170        500      47740
r53         94  101.59416  12.336956
r54         19         24  17.142857
r55         48      53.25  17.226563
r56         60  83.428571  252.45481
r57        139      525.4  38980.032
r58         72        167      11400

. 
. 
. 
. clear

. svmat mao, names(v)
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58

. 
. *1.       Create vector of values.
. g dep=v2/v1

. g dep2=v3/(v1*v1)

. 
. 
. 
. g i=_n

. sort i

. 
. merge 1:1 i using "${geocoord}\distxy"  /* Coordinates */

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                58  (_merge==3)
    -----------------------------------------

. drop _merge

. mkmat x_di

. mkmat y_di

. 
. ren x_di x

. ren y_di y

. 
. drop if dep==0 | dep==.
(0 observations deleted)

. 
. *2.       Calculate variogram
. variog2 dep x y , width(190000) lags(10)   list g(sem)

  +----------------------------------+
  | Lag   Semi-variance   # of pairs |
  |----------------------------------|
  |   1       .90101396          770 |
  |   2       3.2049462          382 |
  |   3       1.2323265          277 |
  |   4        1.070333          106 |
  |   5       1.2911127           78 |
  |----------------------------------|
  |   6         .720706           36 |
  |   7         1.25292            3 |
  |   8       1.0712688            1 |
  +----------------------------------+

. 
. sum dep

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         dep |        58     2.04468     1.23087   1.022572   9.075676

. scalar depmean=r(mean) 

. scalar depvar1=r(Var) 

. replace dep=dep-depmean
(58 real changes made)

. 
. sum dep2

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        dep2 |        58    1.984599    9.285132   .0005368   69.66908

. scalar depvar2=r(mean) 

. scalar depvar=depvar1+ depvar2

. 
. 
. mkmat dep

. mkmat sem

. mkmat x

. mkmat y

. drop if sem==.
(50 observations deleted)

. scalar nlags=_N

. clear

. 
. scalar nv=rowsof(dep)

. *matrix ones=J(1,nv,1)
. *matrix depmean=ones*dep/nv
. 
. scalar variance=0.

. scalar i=1

. while i<=nlags{
  2. scalar variance=max(variance,sem[i,1])
  3. scalar i=i+1
  4. }

. scalar variance=depvar

. di variance
3.4996394

. 
. scalar rangex=nlags*190000

. 
. matrix sem=sem*depvar/variance

. matrix sem=sem[1..nlags,.]

. *scalar variance=depvar
. 
. *4. Variogram matrix
. matrix varmar==J(nv,nv,0)

. scalar i=1

. while i<=nv{
  2. *matrix dep[i,1]=dep[i,1]-depmean[1,1]
. 
. matrix varmar[i,i]=variance
  3. scalar j=1
  4. while j<i{
  5. scalar distance= sqrt((x[i,1] - x[j,1])* (x[i,1] - x[j,1]) + (y[i,1] - y[j,1])* (y[i,1] - y[j,1]))
  6. 
. scalar disran=distance/rangex
  7. scalar semico=variance*(1.5*disran-0.5*disran*disran*disran)                               /*3.       Estimate variogram 
> */
  8. if disran>1{
  9. scalar semico=variance
 10. }
 11. 
. matrix varmar[i,j]=variance-semico
 12. matrix varmar[j,i]= varmar[i,j]
 13. scalar j=j+1
 14. }
 15. scalar i=i+1
 16. }

. 
. * Calculate variogram matrix
. matrix list varmar

symmetric varmar[58,58]
            c1         c2         c3         c4         c5         c6         c7         c8         c9        c10        c11
 r1  3.4996394
 r2  2.1244218  3.4996394
 r3   2.524486  2.9820889  3.4996394
 r4  2.7191535  2.5621511  3.0703696  3.4996394
 r5    1.68822  1.1199295  1.5134739     1.8739  3.4996394
 r6  2.5723946    2.98877  3.4059771  3.0357425  1.4728871  3.4996394
 r7  2.3531103   3.120783  3.3180736   2.920284  1.4197899  3.2645824  3.4996394
 r8  2.1017511  3.4632681  2.9480097  2.5283681  1.0925648  2.9572274  3.0847162  3.4996394
 r9  2.1224686  3.4331681  2.9468533  2.5261442  1.0836307   2.963747  3.0719513  3.4537413  3.4996394
r10  2.0590726  2.9312943  2.5916999  2.2132878  .82825419  2.6520455  2.6439914  2.9556301  2.9968113  3.4996394
r11  1.6510335   1.974548  1.7576841  1.4889008  .39084803  1.8318337  1.7567562   1.995221  2.0344088  2.5071989  3.4996394
r12  2.5589998  1.4235277  1.8578459  2.2130769  2.2789506  1.8647001  1.7038232  1.3979621  1.4064549  1.2699707  .91124198
r13  2.8614837  1.7581185  2.2190157  2.5855311  2.2305823  2.2250635  2.0570828  1.7304682  1.7387455   1.575002  1.1318873
r14  3.2805094  2.2559058  2.6971492  2.9325581  1.7885248  2.7328784  2.5210099  2.2299107  2.2459492  2.1172292  1.6085983
r15   2.705933  2.6386526  2.7493691  2.5595791  1.1637216  2.8411815  2.6548353  2.6313172  2.6695496  2.7910813  2.3101627
r16  1.2135189  1.8778502  1.5309644   1.216189  .21705403  1.5856288  1.5829572  1.9072038  1.9355683  2.3586176  2.7938001
r17  1.4408765  2.1414744  1.7899298  1.4582446  .34355261  1.8479145  1.8412298  2.1709586  2.2020451  2.6463855  2.9147659
r18  1.2764824  1.9926022   1.630227  1.3034733  .25940768  1.6838716  1.6878983  2.0228365  2.0507486   2.469674  2.7860168
r19  2.0397361  2.4573806   2.251912  1.9529018  .67292507  2.3304451   2.248683  2.4752904  2.5183309   2.987888  2.9598987
r20   1.872092  2.3504176   2.103544  1.7969374  .56419768  2.1777294  2.1137295  2.3720373  2.4128828  2.9007857  3.0968154
r21  1.7867047  2.3504916  2.0674975  1.7473855  .52534486  2.1375414  2.0908589  2.3747683  2.4137271   2.904117  3.0720225
r22  1.8436528  2.3877878  2.1170506  1.7988815  .55985317  2.1887382  2.1360623  2.4110069  2.4509822  2.9427783  3.0502493
r23  1.9175876   2.391307  2.1513649    1.84442  .59549227  2.2264388  2.1593634  2.4122129  2.4536605  2.9400692  3.0531318
r24  1.9234065  2.3224403  2.1060124  1.8134814  .58277618  2.1831036  2.1053012  2.3419341  2.3837547   2.862614  3.1143074
r25  1.6507814  2.0802997  1.8292966  1.5390985  .40892162  1.9010094  1.8405925  2.1031264  2.1415931  2.6218563  3.3396464
r26  1.7978351  2.2371447  1.9947508  1.6978133  .50481964  2.0687549  2.0028757  2.2588948  2.2990649  2.7840688  3.2151081
r27   1.750381  2.1680976   1.928324  1.6370956  .46929026   2.002076   1.935404  2.1898891  2.2296344   2.712383  3.2867204
r28  1.8658768  2.2747791  2.0487337  1.7557954  .54460285   2.124645   2.051142   2.295193  2.3363296  2.8183475   3.172855
r29  1.7040785  2.2126464   1.940039   1.632775  .45817867  2.0104391  1.9592635  2.2366447  2.2750371  2.7604955  3.1997655
r30  1.8216469  2.2292514  1.9990828  1.7076684  .51423709  2.0742903   2.002798  2.2501439  2.2907796  2.7732712   3.223873
r31  1.8244955  2.3039767  2.0515633  1.7460817  .53149222  2.1249139   2.063518  2.3262027  2.3664311  2.8544507  3.1431146
r32  1.6165484  2.2377761  1.9220753  1.5972317  .42848316  1.9869351  1.9579601  2.2647247  2.3003165  2.7760914  3.0646306
r33  1.5897816   2.332801  1.9753717  1.6308811  .44319369  2.0343223  2.0282628  2.3623584  2.3949378   2.848784  2.8886459
r34  1.4043205  2.0087871  1.6873948   1.373981  .30136543  1.7487577  1.7267776  2.0365015   2.069215  2.5252914  3.0254031
r35  1.5011945  2.1376137  1.8100637  1.4869061  .36273855  1.8720943  1.8511451  2.1655586  2.1990849  2.6615148  3.0296952
r36  1.5701602  2.1576958  1.8500654  1.5329401  .39235953  1.9153381  1.8829413    2.18427  2.2197307  2.6938294  3.1143347
r37  1.7609603  2.3415044  2.0506448  1.7282742  .51201849  2.1196501  2.0769293  2.3663865  2.4047721  2.8938399  3.0676996
r38  1.7421662  2.2835516  2.0035744  1.6889498  .49024467  2.0735946    2.02563  2.3078524  2.3464153  2.8343316  3.1318547
r39  1.7364499  2.3307585  2.0332098  1.7091272  .49901194  2.1012821  2.0620088  2.3561611  2.3940022  2.8812653  3.0636287
r40   1.708093  2.2598244  1.9736105  1.6581729  .47034845  2.0426816  1.9979954  2.2846475  2.3226093  2.8086359  3.1371324
r41  1.6877859  2.2848079  1.9822659  1.6592745  .46781565  2.0493634  2.0129332   2.310713  2.3477771  2.8313197  3.0823439
r42  1.7660783  2.3687572  2.0712529  1.7447529  .52093757  2.1395414  2.1001351  2.3940199  2.4322083  2.9213041  3.0353111
r43  1.7448875  2.3290027  2.0355068  1.7129913  .50213846     2.1041  2.0627582  2.3541199  2.3922202  2.8802511  3.0726756
r44  1.6984191  2.3310114    2.01776  1.6881199  .48345669  2.0836825  2.0526305  2.3575334  2.3942236  2.8766592  3.0283028
r45  1.9290643  2.6562554  2.3384971  1.9860849  .67296042   2.404453   2.377214  2.6815596  2.7210589  3.2180655   2.768232
r46   1.730436   2.390972  2.0713913  1.7358784  .51183689  2.1367571  2.1088379  2.4177476  2.4545124  2.9377529  2.9765823
r47  .79174306  1.0042988  .81320512  .61775584  .02120233  .86970979  .81656821  1.0235154  1.0529923   1.448289  2.3151934
r48  1.7728812  2.4135291   2.104424  1.7710322   .5353131  2.1713666  2.1378877  2.4394636   2.477246  2.9655588  2.9814017
r49  1.7323108  2.3013054  2.0115684  1.6921898  .49018527  2.0804753  2.0373387  2.3262471  2.3643485  2.8517581  3.1003465
r50  1.8496533  2.6915693  2.3252475  1.9571758  .65014222  2.3838629  2.3828543  2.7204755    2.75612  3.2216561  2.6851383
r51   2.581878  2.5725359  2.6098652  2.4000166  1.0407999  2.7009292  2.5338862  2.5711956  2.6127288  2.8341163  2.4657273
r52  2.3912101  2.8074724  2.7045942  2.3989074  .98582177  2.7890844  2.6789663  2.8130493  2.8575076  3.1160145  2.4951193
r53  2.2261656  2.7423146  2.5523871  2.2302241  .85613064  2.6313484  2.5501358  2.7561919  2.8010712  3.2031025  2.6495275
r54  2.1498399  2.7703839  2.5305208  2.1907124  .82085219  2.6046637  2.5449591  2.7880803  2.8322536  3.2804626  2.6553848
r55  2.2308072  2.7602015  2.5685072  2.2436774  .86471854  2.6471432   2.567408  2.7739654  2.8189037  3.2150286  2.6327068
r56  2.2535726   2.593621  2.4542448  2.1668467  .82807016  2.5378727  2.4319616  2.6052651  2.6498667  3.0467084  2.7408499
r57  2.2380289  2.4662455  2.3499237  2.0862614  .78604927  2.4350231  2.3177614  2.4773112  2.5215011  2.9230374  2.8195583
r58  2.6729915  1.5263501    1.96797  2.3240123  2.2521152  1.9760348  1.8106018  1.5002987   1.509237  1.3692704  .99087191

           c12        c13        c14        c15        c16        c17        c18        c19        c20        c21        c22
r12  3.4996394
r13  3.1066242  3.4996394
r14  2.5315838  2.8882636  3.4996394
r15   1.817934  2.1296357  2.7118639  3.4996394
r16  .56424131  .77310221  1.2134172  1.8799051  3.4996394
r17  .73779563  .97237804  1.4476241  2.1431784  3.1994168  3.4996394
r18  .61206011  .83165599  1.2838763   1.956893  3.3650343   3.296815  3.4996394
r19  1.2260911  1.4948017  2.0285186  2.7846881  2.5421032  2.8078195  2.6111007  3.4996394
r20  1.0848534  1.3419618  1.8599823   2.603279  2.7186652  2.9764181  2.7813118   3.313726  3.4996394
r21  1.0142106  1.2704202  1.7832042  2.5193297  2.8169125  3.0876647  2.8888533  3.2160967  3.3810536  3.4996394
r22  1.0613308  1.3213768  1.8398136  2.5810551  2.7540515  3.0258188  2.8268322  3.2789757  3.4229158  3.4355675  3.4996394
r23  1.1228597  1.3840803  1.9071566  2.6544325  2.6715188  2.9346673  2.7380012  3.3654708   3.445902  3.3449643  3.4031271
r24  1.1284794  1.3834982  1.9021569  2.6461145  2.6507686  2.8956083  2.7048783  3.3431521  3.4070809  3.2900145   3.332026
r25  .90563621  1.1366759  1.6234502  2.3395163  2.8966231  3.0607791  2.9111198  3.0287497  3.1982054  3.2084554  3.1722917
r26  1.0241352  1.2703983  1.7767257  2.5104981  2.7794423  3.0076139  2.8242531  3.2120417  3.3788146  3.3376355  3.3317096
r27  .98610714  1.2257079  1.7243755  2.4510035  2.8098896  3.0134881  2.8418608  3.1434693  3.3045332  3.2803731  3.2623408
r28  1.0806756   1.330836  1.8432342  2.5819126  2.7061626  2.9415059   2.754608  3.2791594  3.4069831  3.3123192  3.3346033
r29  .94662295  1.1900728  1.6896052  2.4171782  2.8951623  3.1247399  2.9422984  3.1212518  3.3062822   3.353651  3.3065569
r30  1.0444053  1.2900525  1.7968733   2.530592  2.7444927  2.9677163  2.7862187   3.224404  3.3694185  3.3040956  3.3087146
r31  1.0454135  1.2979435  1.8103538  2.5491427  2.7668571  3.0162695  2.8241759  3.2579484  3.4419366  3.3966533  3.4038694
r32  .87586394  1.1206848  1.6155822  2.3343514  3.0094075  3.2775541  3.0809422  3.0218331  3.1964788  3.3041223  3.2403586
r33  .85745845  1.1096361   1.605479  2.3126356  2.9952033   3.292887  3.1048664  2.9527189  3.0934383  3.2110229  3.1610592
r34  .70838984  .93135015  1.3970344  2.0914298  3.2472547  3.3200576  3.2567201  2.7756031  2.9576101  3.0473419  2.9844681
r35  .78407893   1.019156  1.4998335  2.2056419  3.1447091   3.382407  3.2074381  2.8888032   3.066552  3.1689009  3.1051513
r36  .83850781  1.0760394  1.5632821  2.2776904  3.0594072  3.2858547  3.1102015  2.9714459  3.1538724  3.2453179  3.1823881
r37  .99312146  1.2482778  1.7588476  2.4923699  2.8454798  3.1183744  2.9190436  3.1857293  3.3506445  3.4684686  3.4059427
r38  .97746052  1.2274631  1.7337106  2.4658797  2.8638843   3.119246  2.9255659  3.1690373  3.3516445   3.428536  3.3744766
r39  .97310908  1.2270804  1.7353928  2.4663735  2.8726721  3.1472282   2.947522  3.1570039  3.3224259  3.4394254  3.3772814
r40  .94963697  1.1972666  1.6999379  2.4288224  2.9020299   3.154256  2.9621769  3.1302992  3.3130757  3.3969764  3.3379982
r41  .93331789  1.1828794  1.6854483  2.4118966  2.9280096  3.1969217  2.9990515  3.1042034  3.2778227  3.3868492  3.3228863
r42  .99766465  1.2551623  1.7673534  2.5005349  2.8380476  3.1179626  2.9172343  3.1850724  3.3361378  3.4508393  3.4031858
r43  .97992516  1.2338449  1.7426774  2.4746958  2.8635058   3.135621   2.936513  3.1680408  3.3358169  3.4513665  3.3879127
r44  .94252802  1.1960652  1.7015158  2.4275442  2.9122902  3.1957487  2.9943392  3.1072994  3.2659144  3.3841967  3.3263376
r45  1.1406986  1.4234737  1.9565117  2.6827892  2.6030051  2.8970642  2.7060958  3.1817936  3.1595768  3.1816952  3.2141413
r46  .96953444  1.2283764  1.7386571  2.4654556  2.8676469  3.1590797  2.9581559   3.127854  3.2631252  3.3754797  3.3352689
r47  .29447844  .41642791  .73684583  1.2716873  2.2753758  2.0974857  2.1575313  1.8173276  1.9548073    1.96916  1.9299319
r48  1.0041511  1.2654073   1.779894  2.5113662  2.8230735  3.1118642    2.91095  3.1759312  3.3016352  3.4021438  3.3770119
r49   .9694725  1.2209062  1.7274688  2.4586265  2.8773727  3.1420648  2.9452116  3.1566724  3.3328479  3.4356604  3.3726052
r50  1.0802448  1.3637782  1.8890925  2.5909173   2.624915  2.9164496   2.739468  3.0520695  3.0562606  3.1076454  3.1221845
r51   1.701471  1.9970153  2.5652487  3.3321729  2.0033124  2.2644022  2.0751846  2.9279518   2.745547  2.6532585  2.7157424
r52  1.5428625  1.8527202  2.4225135  3.1651983  2.1474803  2.4268184  2.2368622  3.0216368  2.8504986  2.7880251  2.8478397
r53  1.3934997  1.6909579  2.2484009  3.0002445  2.3226377  2.6061291  2.4127637  3.1835537  3.0246984  2.9695873  3.0286769
r54   1.330375  1.6274525  2.1797142  2.9168102  2.3805784  2.6684226  2.4765769  3.1773682  3.0456661  3.0099811  3.0641571
r55  1.3986554  1.6977074  2.2558101  3.0041801   2.312853  2.5968786  2.4041305  3.1660637  3.0091539  2.9563731  3.0148495
r56  1.4109908  1.6964985  2.2497856  3.0198542  2.3226173  2.5942795  2.3990002  3.2594195  3.0753051  2.9895297   3.053007
r57  1.3974378  1.6702963  2.2134987  2.9732168  2.3310573  2.5883184  2.3951429   3.274355    3.09838  2.9931574  3.0549514
r58  3.3751504  3.2267723  2.6517075  1.9258902  .63441422  .81656592  .68527583  1.3195651  1.1741358  1.1021434  1.1507234

           c23        c24        c25        c26        c27        c28        c29        c30        c31        c32        c33
r23  3.4996394
r24   3.409662  3.4996394
r25  3.1466324  3.1799719  3.4996394
r26  3.3296473  3.3589478  3.3147639  3.4996394
r27  3.2559378  3.2964188  3.3827528  3.4252927  3.4996394
r28  3.3761932  3.4332999  3.2460965  3.4229933  3.3625878  3.4996394
r29   3.253035  3.2496458  3.3498634  3.3799373  3.3792317  3.3070656  3.4996394
r30  3.3281176  3.3789441  3.3000005  3.4584886  3.4168146    3.44474  3.3408402  3.4996394
r31  3.3882631  3.3776448   3.253833  3.4269514  3.3548658  3.4143545  3.3623272  3.4029457  3.4996394
r32  3.1524277  3.1157748  3.2238757  3.2230367   3.214761  3.1603829  3.3342812  3.1821313  3.2372484  3.4996394
r33  3.0651823  3.0024965  3.0470214  3.0767936  3.0511201  3.0300682  3.1698907  3.0367949   3.114446  3.3216162  3.4996394
r34  2.9076547  2.8941677  3.1438767  3.0270537  3.0594668  2.9521721  3.1421742  2.9925539    3.00914  3.2322039  3.1473362
r35  3.0201004  2.9920044  3.1774073   3.113295  3.1259704   3.043164  3.2324232  3.0743512  3.1123779  3.3631568  3.2799302
r36  3.1044815  3.0846634  3.2689225  3.2107335  3.2251145  3.1387518  3.3301911  3.1723253  3.2035841   3.413541  3.2537592
r37  3.3138575  3.2605354  3.2108337  3.3209154  3.2710871  3.2869566  3.3597844  3.2844836  3.3721381  3.3336627  3.2399533
r38  3.3027968  3.2741081  3.2757238  3.3693576  3.3314502  3.3166939  3.4239296  3.3291752  3.3959503  3.3407804  3.2064035
r39   3.284829  3.2332953  3.2119986  3.3036061  3.2608596  3.2630707  3.3613309  3.2653135  3.3480276  3.3613317  3.2655467
r40  3.2639516  3.2381389  3.2889529  3.3456999  3.3230897  3.2848386  3.4367215  3.3046053  3.3597783  3.3748395  3.2258524
r41  3.2348776  3.1940585  3.2379965  3.2881506  3.2625729  3.2335719  3.3789749   3.247379  3.3146719  3.4166971  3.2861437
r42  3.3069166  3.2440074  3.1788623   3.291362  3.2390887  3.2636545  3.3280798  3.2564101  3.3479003  3.3248839  3.2558708
r43  3.2970326  3.2471192  3.2190805    3.31691  3.2722475  3.2772044  3.3686526  3.2789285  3.3621854  3.3518772    3.25141
r44   3.231216  3.1761007  3.1827299  3.2501635  3.2148607  3.2059466  3.3265188  3.2108077  3.2906366  3.3941503  3.3228727
r45  3.1879892  3.1003427  2.8934401  3.0482356  2.9781585  3.0694904  3.0367071  3.0308626  3.1204665  3.0502978  3.0961249
r46  3.2398267  3.1708293  3.1272126  3.2189367  3.1725279  3.1884571  3.2748842  3.1826559   3.272694  3.3352192  3.3228753
r47  1.9100656  1.9578093   2.231381  2.0648878  2.1334079  2.0139944  2.1030679   2.063361  2.0040996  2.0679843   1.942153
r48  3.2839998  3.2098446  3.1255181  3.2402925  3.1854407  3.2202877  3.2748037  3.2072906  3.3017624  3.2995877  3.2749744
r49  3.2887012  3.2488779  3.2483288  3.3343663  3.2964004  3.2860936  3.3979236  3.2946779  3.3688803  3.3627485  3.2405797
r50  3.0749881  2.9858101  2.8227105  2.9565951  2.8921217   2.964436  2.9702572  2.9329311  3.0272282  3.0252714  3.1214326
r51  2.7957627   2.796008  2.4887288  2.6584088  2.6011503  2.7318563  2.5591546  2.6811694  2.6924599  2.4644226  2.4264586
r52  2.9032442  2.8672644  2.5600661   2.740055  2.6711352  2.8038522   2.664748  2.7500455  2.7937872  2.6085795  2.6112823
r53  3.0768609  3.0291263  2.7281439  2.9092974  2.8377174  2.9682968  2.8412069  2.9147898  2.9680118  2.7903455  2.7909539
r54  3.0944416  3.0320134  2.7488839   2.926481  2.8533131   2.976845  2.8730846  2.9255746  2.9912431  2.8416866  2.8601421
r55  3.0610459  3.0120309  2.7125146  2.8933059  2.8215756  2.9515851  2.8267938  2.8982408  2.9526533  2.7788158  2.7832051
r56  3.1280837  3.1100565  2.7939592   2.974345  2.9086478  3.0443506  2.8837996  2.9902349  3.0191074  2.7977578  2.7592458
r57   3.145376  3.1589735  2.8481313  3.0193178  2.9628134  3.0947573  2.9135507  3.0440574  3.0478545  2.8013728  2.7327946
r58  1.2134641  1.2180781  .98717925  1.1104987    1.07062  1.1686547  1.0311561  1.1309844  1.1332482  .95929709  .94166428

           c34        c35        c36        c37        c38        c39        c40        c41        c42        c43        c44
r34  3.4996394
r35  3.3591214  3.4996394
r36  3.3003625  3.4000587  3.4996394
r37  3.0736362  3.1977916  3.2707465  3.4996394
r38  3.1026141   3.213647   3.300761  3.4344211  3.4996394
r39  3.0986512  3.2250923  3.2943339  3.4705598  3.4289255  3.4996394
r40  3.1412831  3.2514744  3.3396267  3.4130734  3.4607269   3.421576  3.4996394
r41  3.1562709  3.2813209  3.3518534  3.4157368  3.4162195   3.441705  3.4389578  3.4996394
r42  3.0598804  3.1889542  3.2539699  3.4670119   3.401982  3.4582272  3.3842027  3.4016247  3.4996394
r43  3.0918053  3.2160606  3.2887791  3.4812538  3.4397198  3.4854708  3.4261192  3.4341123  3.4576988  3.4996394
r44     3.1274  3.2615221  3.3130968  3.4147755  3.3797248  3.4419887  3.3890674   3.443762  3.4213616  3.4278749  3.4996394
r45  2.7905855    2.92799  2.9684526  3.1729714  3.1117821  3.1606801  3.0869696  3.1096952  3.2010706  3.1595576  3.1537302
r46  3.0720246   3.209373  3.2515239  3.3974312  3.3402471  3.4108582   3.337246  3.3831206  3.4242403  3.3995672  3.4363159
r47  2.2616492   2.144022  2.1474981  1.9784233  2.0339611  1.9883074  2.0574774  2.0308301  1.9522355  1.9903444  1.9838462
r48  3.0334166  3.1682131   3.220265  3.4126305  3.3477931  3.4110102  3.3331903   3.363618  3.4452507  3.4056489  3.4049917
r49  3.1105658   3.229702  3.3090488   3.456612  3.4639039  3.4626863  3.4556806  3.4444031  3.4280396   3.469838  3.4152413
r50  2.7836563  2.9215487  2.9400434  3.1086951  3.0439629  3.1055123  3.0279974  3.0655328  3.1406061   3.099952  3.1180927
r51  2.2237019  2.3346821  2.4121105  2.6248161  2.6036734  2.5976494  2.5659806  2.5438945  2.6298219  2.6070979  2.5546311
r52  2.3525065  2.4781093  2.5412319  2.7641514  2.7252913  2.7403756  2.6893628   2.683764    2.77867  2.7464539  2.7090453
r53  2.5305584  2.6584835  2.7212339   2.946337  2.9048009  2.9228714  2.8692158  2.8657389   2.961852  2.9286104  2.8921017
r54   2.580248  2.7122085  2.7675355  2.9901921  2.9416503  2.9694151  2.9084069  2.9129426  3.0099015  2.9732382  2.9454421
r55  2.5189104  2.6474446  2.7088778  2.9336183   2.891048  2.9105589  2.8557744  2.8535109  2.9498116   2.915999  2.8809351
r56  2.5468164  2.6644171  2.7407568  2.9612687  2.9352958  2.9340219  2.8971289  2.8784733  2.9677203  2.9431286  2.8913804
r57  2.5650076  2.6712257   2.756555  2.9626859  2.9516335  2.9340321  2.9134206  2.8828925  2.9611879   2.945382  2.8840473
r58   .7845546  .86397892    .919961  1.0805015  1.0636876   1.059927  1.0349542  1.0186589  1.0855129  1.0668596  1.0286983

           c45        c46        c47        c48        c49        c50        c51        c52        c53        c54        c55
r45  3.4996394
r46  3.2138393  3.4996394
r47  1.6870262  1.9263777  3.4996394
r48  3.2451534  3.4505562  1.9087971  3.4996394
r49  3.1306327  3.3743026  2.0171323  3.3760373  3.4996394
r50  3.3670841  3.1809356   1.644682  3.1934402  3.0704442  3.4996394
r51  2.7800321  2.5876171  1.4063229   2.634915  2.5932554  2.6735595  3.4996394
r52  3.0014928  2.7555564  1.4097782  2.7996311  2.7254276  2.9166862  3.2095584  3.4996394
r53   3.177295  2.9390429  1.5437367  2.9835957  2.9066364  3.0759829  3.0916451  3.3132072  3.4996394
r54  3.2574794  2.9975568  1.5548029  3.0389782  2.9486021  3.1657022  3.0003118  3.2424266   3.406618  3.4996394
r55  3.1729576  2.9288817  1.5294001  2.9728632  2.8936095  3.0759339   3.089858  3.3231835  3.4812083  3.4091759  3.4996394
r56    3.09721  2.9252626  1.6238363  2.9735041  2.9274542  2.9744991  3.1552312  3.2411553  3.3371178  3.2633715  3.3209104
r57  3.0183722  2.9055934  1.7021634  2.9537251  2.9359763  2.8889296  3.1311706  3.1247954  3.2057334  3.1405571  3.1889769
r58  1.2349638  1.0570698  .34003378  1.0927223  1.0557995   1.173429  1.8055856  1.6471801  1.4939774  1.4298252  1.4994329

           c56        c57        c58
r56  3.4996394
r57  3.3667006  3.4996394
r58  1.5098884  1.4939962  3.4996394

. matrix varinv=inv(varmar)

. 
. *5.       Calculate variogram vector to estimation point
. forval i = 1/58{
  2. 
. if  mao[`i',2]==0{
  3. 
. matrix varvec=J(nv,1,0)
  4. 
. scalar j=1
  5. while j<=nv{
  6. scalar distance= sqrt((x_di[`i',1] - x[j,1])* (x_di[`i',1] - x[j,1]) + (y_di[`i',1] - y[j,1])* (y_di[`i',1] - y[j,1]))
  7. scalar disran=distance/rangex
  8. scalar semico=variance*(1.5*disran-0.5*disran*disran*disran)          /*3.       Estimate variogram */
  9. if disran>1{
 10. scalar semico=variance
 11. }
 12. di j "   " distance  " " variance-semico " " sem[j,1] " " dep[j,1] " " depmean
 13. matrix varvec[j,1]=variance-semico
 14. scalar j=j+1
 15. }
 16. matrix beta=varinv*varvec
 17. matrix list beta
 18. matrix dephat=dep'*beta+depmean
 19. matrix va=variance- varvec'*beta
 20. di `i' " " dephat[1,1] "  " va[1,1]
 21. di "   "
 22. *matrix list beta
. matrix mao[`i',2]=mao[`i',1]*dephat[1,1]
 23. matrix mao[`i',3]=mao[`i',1]*mao[`i',1]*(variance- varvec'*beta)
 24. }
 25. matrix mao[`i',2]=int(mao[`i',2]+0.5)
 26. matrix mao[`i',3]=int(mao[`i',3]+0.5)
 27. 
. }

. 
. matrix ones58==J(1,58,1)

. matrix sum_mao=ones58*mao

. matrix list sum_mao

sum_mao[1,3]
         c1       c2       c3
r1     9566    20516  2962674

. 
. di sqrt(sum_mao[1,3])
1721.242

. matrix list mao

mao[58,3]
          c1       c2       c3
 r1      367      767     8248
 r2       42       48       22
 r3       29       31        4
 r4       57       95      547
 r5       71      206     3959
 r6       22       26        9
 r7       40       61      672
 r8       23       29       38
 r9      185     1679  2384424
r10       19       20        2
r11      675     1552    33491
r12      141      453    24654
r13       12       25      153
r14     1260     2762    34576
r15       68       96      149
r16       26      114     9504
r17       47      140    11904
r18       17       24       29
r19      168      699   175230
r20      341      744    18565
r21       68       91      433
r22       68       70        2
r23      199      371     2648
r24       37       44       75
r25      956     1413     3310
r26      156      287     2342
r27       68       83      150
r28      144      434     8975
r29       47       75      191
r30       72       95      181
r31      161      499    19259
r32      378      599     4322
r33       89      188     8415
r34       62      132     1155
r35      436      591      691
r36      623     1495    67063
r37      489      750     4978
r38       17       33      181
r39       32       33        2
r40      137      173      125
r41      101      263    16929
r42       55       64       25
r43       79      151     2520
r44       43       93     1145
r45      362      610     5067
r46       70      201     3782
r47       91      130      198
r48      145      238     1273
r49       23       56      626
r50       35       57     1012
r51      111      172     1001
r52      170      500    47740
r53       94      102       12
r54       19       24       17
r55       48       53       17
r56       60       83      252
r57      139      525    38980
r58       72      167    11400

. 
. scalar nestim2=nestim/sum_mao[1,1]

. di nlags,nestim,nestim2
8 9566 1

. 
end of do-file

mao[58,3]
          c1       c2       c3
 r1      367      767     8248
 r2       42       48       22
 r3       29       31        4
 r4       57       95      547
 r5       71      206     3959
 r6       22       26        9
 r7       40       61      672
 r8       23       29       38
 r9      185     1679  2384424
r10       19       20        2
r11      675     1552    33491
r12      141      453    24654
r13       12       25      153
r14     1260     2762    34576
r15       68       96      149
r16       26      114     9504
r17       47      140    11904
r18       17       24       29
r19      168      699   175230
r20      341      744    18565
r21       68       91      433
r22       68       70        2
r23      199      371     2648
r24       37       44       75
r25      956     1413     3310
r26      156      287     2342
r27       68       83      150
r28      144      434     8975
r29       47       75      191
r30       72       95      181
r31      161      499    19259
r32      378      599     4322
r33       89      188     8415
r34       62      132     1155
r35      436      591      691
r36      623     1495    67063
r37      489      750     4978
r38       17       33      181
r39       32       33        2
r40      137      173      125
r41      101      263    16929
r42       55       64       25
r43       79      151     2520
r44       43       93     1145
r45      362      610     5067
r46       70      201     3782
r47       91      130      198
r48      145      238     1273
r49       23       56      626
r50       35       57     1012
r51      111      172     1001
r52      170      500    47740
r53       94      102       12
r54       19       24       17
r55       48       53       17
r56       60       83      252
r57      139      525    38980
r58       72      167    11400

sum_mao[1,3]
         c1       c2       c3
r1     9566    20516  2962674

modelmat[7,1]
    c1
r1   4
r2   4
r3   2
r4  18
r5  20
r6   0
r7  10
perpe:  1
depmean:  2.0446796
depvar:  3.4996394
depvar1:  1.5150406
depvar2:  1.9845988
nlags:  8
nstrata:  58
nestim:  9566
nestimratio:  1
nestime:  20514.871
nestimv:  2962673

. * This program estimates total population analytically and performs the kriging geographical interppolation
. scalar diestim=0

. scalar nestim=0

. scalar nestime=0

. scalar nestimv=0

. ******************************
. matrix mao=J(nstrata,3,0)

. matrix modelmat=J(7, 1, 0)

. forval ii = 1/58{   /* begin loop strata */
  2. scalar jhat=`ii'
  3. scalar jj1=(jhat-1)*8*3+(perpeh-1)*8+1
  4. scalar jj2=jj1+6
  5. 
. matrix a=yy[jj1..jj2,1]              /*original data*/
  6. run "$code\analya"
  7. matrix mao[jhat,1]=ntotalm
  8. if modeli>0 & (perpeh~=2 | jhat~=57) & (perpeh~=3 | jhat~=52) {           /* Original*/
  9. matrix modelmat[modeli,1]=modelmat[modeli,1]+1
 10. matrix mao[jhat,2]=nmv[modeli, 1]
 11. matrix mao[jhat,3]=nmv[modeli, 2]
 12. scalar diestim=diestim+1
 13. scalar nestim=nestim+mao[jhat,1]
 14. scalar nestime=nestime+mao[jhat,2]
 15. scalar nestimv=nestimv+mao[jhat,3]
 16. 
. matrix reportmo=nmv,prm,chi2ml,dfml
 17. 
. forval ii= 1/7{
 18. matrix reportmo[`ii',2]=sqrt(reportmo[`ii',2])
 19. matrix reportmo[`ii',4]=reportmo[`ii',4]/reportmo[`ii',5]
 20. }
 21. 
. di perpeh,jhat
 22. matrix reportmo=reportmo[1..7,1..4]
 23. matrix list reportmo
 24. }
 25. 
. 
. } /* end loop strata*/
2 11

reportmo[7,4]
           c1         c2         c1         c1
r1  732.79278  84.081895  .07676472   2.284029
r2        810  166.64762  .04008553  3.2167399
r3      681.6  87.216145  .03929304  3.2367078
r4   741.5625  89.171295  .62047329  .47727273
r5      844.5  195.15859  .64042879  .21818182
r6          0          0          0          .
r7        692  96.150345  .49015296  .47619048
2 14

reportmo[7,4]
           c1         c2         c1         c1
r1  1604.8669  189.56203  .00001257  8.4759607
r2       2110  543.50713          .          .
r3       1270          0          .          .
r4  1627.7143  203.93568  .07642629  2.5714286
r5     2271.6  673.23401          .          .
r6          0          0          0          .
r7       1270          0          .          .
2 25

reportmo[7,4]
           c1         c2         c1         c1
r1  957.63458  93.289633  .12547027  1.9102511
r2  966.87931  95.306451          .          .
r3        422          0          .          .
r4  953.89831  92.734073          .          .
r5  963.06897  94.736082          .          .
r6          0          0          0          .
r7        422          0          .          .
2 32

reportmo[7,4]
           c1         c2         c1         c1
r1  272.76559  50.342493          0  44.643957
r2      194.4  34.940406          0  57.120109
r3  332.14286  89.586026          0  54.621123
r4        352  97.488461  .00865856  4.7492063
r5          0          0          0          .
r6          0          0          0          .
r7        751  468.00641  .01430588          6
2 35

reportmo[7,4]
           c1         c2         c1         c1
r1  294.26788  53.419618          0  58.838794
r2        246          0          .          .
r3  326.66667  93.721415          .          .
r4  326.66667  93.721415          .          .
r5          0          0          0          .
r6          0          0          0          .
r7        488  342.94606          .          .
2 36

reportmo[7,4]
           c1         c2         c1         c1
r1  636.75177  183.38011  .38779582  1.0083135
r2        426          0          .          .
r3       1272  1037.3582          .          .
r4        636  182.72931          .          .
r5        426          0          .          .
r6          0          0          0          .
r7       1266  1030.0097          .          .
2 47

reportmo[7,4]
           c1         c2         c1         c1
r1  474.99017  86.042779   .8856799  .21554252
r2        456  83.338051  .91910223  .08435792
r3        768  625.84343  .94939819  .05192698
r4      472.5  85.084517          .          .
r5  453.46154  82.297727          .          .
r6          0          0          0          .
r7        720  567.05555          .          .
2 48

reportmo[7,4]
           c1         c2         c1         c1
r1  425.66745  122.59014  .71799825  .44900791
r2        638  450.42646          .          .
r3        320          0          .          .
r4  425.33333  122.20444          .          .
r5        636  447.59803          .          .
r6          0          0          0          .
r7        320          0          .          .
2 51

reportmo[7,4]
           c1         c2         c1         c1
r1   400.3009  89.218269          0  110.62622
r2        321          0          .          .
r3        321          0          .          .
r4  426.66667  122.58935  .13533528          2
r5        321          0          .          .
r6        321          0          .          .
r7        321          0          .          .

. 
. matrix list mao

mao[58,3]
            c1         c2         c3
 r1        151          0          0
 r2          1          0          0
 r3         23          0          0
 r4         46          0          0
 r5        105          0          0
 r6         18          0          0
 r7         12          0          0
 r8          5          0          0
 r9         36          0          0
r10         21          0          0
r11        570        692  9244.8889
r12         32          0          0
r13         12          0          0
r14       1270  1627.7143  41589.761
r15         95          0          0
r16         52          0          0
r17         57          0          0
r18         54          0          0
r19        166          0          0
r20        347          0          0
r21         23          0          0
r22         60          0          0
r23        174          0          0
r24        130          0          0
r25        422  957.63458  8702.9557
r26        205          0          0
r27        127          0          0
r28         82          0          0
r29         98          0          0
r30        132          0          0
r31        252          0          0
r32        163        751     219030
r33        190          0          0
r34        114          0          0
r35        246  294.26788  2853.6556
r36        426  636.75177  33628.266
r37        169          0          0
r38         12          0          0
r39         21          0          0
r40        225          0          0
r41         21          0          0
r42         81          0          0
r43         28          0          0
r44          6          0          0
r45        409          0          0
r46        123          0          0
r47        258  474.99017  7403.3598
r48        320  425.66745  15028.343
r49          8          0          0
r50         82          0          0
r51        321  426.66667  15028.148
r52        159          0          0
r53         27          0          0
r54          7          0          0
r55         26          0          0
r56         72          0          0
r57        776          0          0
r58          7          0          0

. 
. 
. 
. clear

. svmat mao, names(v)
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58

. 
. *1.       Create vector of values.
. g dep=v2/v1

. g dep2=v3/(v1*v1)

. 
. 
. 
. g i=_n

. sort i

. 
. merge 1:1 i using "${geocoord}\distxy"  /* Coordinates */

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                58  (_merge==3)
    -----------------------------------------

. drop _merge

. mkmat x_di

. mkmat y_di

. 
. ren x_di x

. ren y_di y

. 
. drop if dep==0 | dep==.
(49 observations deleted)

. 
. *2.       Calculate variogram
. variog2 dep x y , width(190000) lags(10)   list g(sem)

  +----------------------------------+
  | Lag   Semi-variance   # of pairs |
  |----------------------------------|
  |   1       1.7673005           15 |
  |   2       .68152148            9 |
  |   3       .78557821            6 |
  |   4       1.1379539            5 |
  +----------------------------------+

. 
. sum dep

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         dep |         9    1.840412    1.095482   1.196211   4.607362

. scalar depmean=r(mean) 

. scalar depvar1=r(Var) 

. replace dep=dep-depmean
(9 real changes made)

. 
. sum dep2

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        dep2 |         9    .9981352    2.717758   .0257857   8.243818

. scalar depvar2=r(mean) 

. scalar depvar=depvar1+ depvar2

. 
. 
. mkmat dep

. mkmat sem

. mkmat x

. mkmat y

. drop if sem==.
(5 observations deleted)

. scalar nlags=_N

. clear

. 
. scalar nv=rowsof(dep)

. *matrix ones=J(1,nv,1)
. *matrix depmean=ones*dep/nv
. 
. scalar variance=0.

. scalar i=1

. while i<=nlags{
  2. scalar variance=max(variance,sem[i,1])
  3. scalar i=i+1
  4. }

. scalar variance=depvar

. di variance
2.1982156

. 
. scalar rangex=nlags*190000

. 
. matrix sem=sem*depvar/variance

. matrix sem=sem[1..nlags,.]

. *scalar variance=depvar
. 
. *4. Variogram matrix
. matrix varmar==J(nv,nv,0)

. scalar i=1

. while i<=nv{
  2. *matrix dep[i,1]=dep[i,1]-depmean[1,1]
. 
. matrix varmar[i,i]=variance
  3. scalar j=1
  4. while j<i{
  5. scalar distance= sqrt((x[i,1] - x[j,1])* (x[i,1] - x[j,1]) + (y[i,1] - y[j,1])* (y[i,1] - y[j,1]))
  6. 
. scalar disran=distance/rangex
  7. scalar semico=variance*(1.5*disran-0.5*disran*disran*disran)                               /*3.       Estimate variogram 
> */
  8. if disran>1{
  9. scalar semico=variance
 10. }
 11. 
. matrix varmar[i,j]=variance-semico
 12. matrix varmar[j,i]= varmar[i,j]
 13. scalar j=j+1
 14. }
 15. scalar i=i+1
 16. }

. 
. * Calculate variogram matrix
. matrix list varmar

symmetric varmar[9,9]
           c1         c2         c3         c4         c5         c6         c7         c8         c9
r1  2.1982156
r2  .17955637  2.1982156
r3  1.9974109   .1889618  2.1982156
r4  1.6555133  .18395566  1.8527454  2.1982156
r5  1.6126167  .11670381  1.7949417   2.026875  2.1982156
r6  1.7167975   .1520497  1.9089379  2.0900834  2.0731621  2.1982156
r7  .79014463          0  .70385249   .5445309  .61711083  .62049583  2.1982156
r8  1.5535859  .29880652  1.7306241  1.9472657  1.7835267  1.8482477  .40251731  2.1982156
r9  .95180751  1.0628061  .97719092  .95037278  .81061048   .8933122  .07192362  1.1422102  2.1982156

. matrix varinv=inv(varmar)

. 
. *5.       Calculate variogram vector to estimation point
. forval i = 1/58{
  2. 
. if  mao[`i',2]==0{
  3. 
. matrix varvec=J(nv,1,0)
  4. 
. scalar j=1
  5. while j<=nv{
  6. scalar distance= sqrt((x_di[`i',1] - x[j,1])* (x_di[`i',1] - x[j,1]) + (y_di[`i',1] - y[j,1])* (y_di[`i',1] - y[j,1]))
  7. scalar disran=distance/rangex
  8. scalar semico=variance*(1.5*disran-0.5*disran*disran*disran)          /*3.       Estimate variogram */
  9. if disran>1{
 10. scalar semico=variance
 11. }
 12. di j "   " distance  " " variance-semico " " sem[j,1] " " dep[j,1] " " depmean
 13. matrix varvec[j,1]=variance-semico
 14. scalar j=j+1
 15. }
 16. matrix beta=varinv*varvec
 17. matrix list beta
 18. matrix dephat=dep'*beta+depmean
 19. matrix va=variance- varvec'*beta
 20. di `i' " " dephat[1,1] "  " va[1,1]
 21. di "   "
 22. *matrix list beta
. matrix mao[`i',2]=mao[`i',1]*dephat[1,1]
 23. matrix mao[`i',3]=mao[`i',1]*mao[`i',1]*(variance- varvec'*beta)
 24. }
 25. matrix mao[`i',2]=int(mao[`i',2]+0.5)
 26. matrix mao[`i',3]=int(mao[`i',3]+0.5)
 27. 
. }
1   560703.15 .20692383 1.7673005 -.62637705 1.8404121
2   63486.808 1.9234135 .68152148 -.55874735 1.8404121
3   560787.66 .20675677 .78557819 .42886427 1.8404121
4   572299.24 .18456757 1.1379539 2.7669497 1.8404121
5   611675.27 .11742152 . -.64420122 1.8404121
6   588021.77 .15610671 . -.34568962 1.8404121
7   883618.61 0 . .00063507 1.8404121
8   520311.9 .29348711 . -.51020128 1.8404121
9   268534.94 1.0816388 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .01134217
c2   .82624629
c3   .00059356
c4  -.00261016
c5  -.01104894
c6   .00114295
c7   .00187006
c8  -.03445887
c9   .10998208
1 1.3327554  .49928573
   
1   455204.28 .45944047 1.7673005 -.62637705 1.8404121
2   367275.31 .72880473 .68152148 -.55874735 1.8404121
3   421802.24 .55609114 .78557819 .42886427 1.8404121
4   372855.61 .71033457 1.1379539 2.7669497 1.8404121
5   403884.76 .61088533 . -.64420122 1.8404121
6   397635.48 .63045909 . -.34568962 1.8404121
7   795037.78 0 . .00063507 1.8404121
8   319178.48 .89484738 . -.51020128 1.8404121
9   271328.06 1.0710493 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.15156322
c2   .14780945
c3  -.05684743
c4    .0368809
c5   .05188735
c6  -.06583843
c7  -.00834257
c8   .35874733
c9   .31220989
2 1.5771108  1.5199352
   
1   525302.71 .28208064 1.7673005 -.62637705 1.8404121
2   234217.71 1.2142131 .68152148 -.55874735 1.8404121
3   501893.94 .33725181 .78557819 .42886427 1.8404121
4   471956.33 .41380525 1.1379539 2.7669497 1.8404121
5   508153.96 .32208515 . -.64420122 1.8404121
6   495155.38 .35390798 . -.34568962 1.8404121
7   874282.27 0 . .00063507 1.8404121
8   414245.39 .57895798 . -.51020128 1.8404121
9   260178.35 1.1135075 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.11883703
c2   .40000437
c3  -.03220785
c4   .01447773
c5  -.00484303
c6  -.02894078
c7   .01669574
c8   .17853514
c9   .29290023
3 1.4898999  1.3332092
   
1   615928.54 .1110049 1.7673005 -.62637705 1.8404121
2   164846.74 1.4942303 .68152148 -.55874735 1.8404121
3   598632.61 .13812958 .78557819 .42886427 1.8404121
4   578828.68 .17248661 1.1379539 2.7669497 1.8404121
5   616619.71 .10997796 . -.64420122 1.8404121
6   600744.55 .13467175 . -.34568962 1.8404121
7   963510.91 0 . .00063507 1.8404121
8   520918.45 .29209042 . -.51020128 1.8404121
9   323274 .880253 . -.51123244 1.8404121

beta[9,1]
            c1
c1   -.0742856
c2    .6270617
c3  -.01928187
c4  -.00108782
c5   -.0029815
c6  -.00917084
c7   .02087136
c8   .06642176
c9    .1081013
4 1.4412454  1.1593434
   
1   1083865.5 0 1.7673005 -.62637705 1.8404121
2   515187.69 .30540103 .68152148 -.55874735 1.8404121
3   1073324.3 0 .78557819 .42886427 1.8404121
4   1062142.6 0 1.1379539 2.7669497 1.8404121
5   1100696.1 0 . -.64420122 1.8404121
6   1082975.8 0 . -.34568962 1.8404121
7   1422348.5 0 . .00063507 1.8404121
8   1004612.1 0 . -.51020128 1.8404121
9   780586.57 0 . -.51123244 1.8404121

beta[9,1]
            c1
c1    .0183137
c2   .18758792
c3   .00357159
c4   .00220436
c5   .00599235
c6   .00014685
c7   -.0081941
c8   .00947253
c9  -.10808981
5 1.7782675  2.1409261
   
1   501069.58 .33927116 1.7673005 -.62637705 1.8404121
2   223632.04 1.2559722 .68152148 -.55874735 1.8404121
3   478717.24 .39594704 .78557819 .42886427 1.8404121
4   451267.51 .47044596 1.1379539 2.7669497 1.8404121
5   488031.71 .37188325 . -.64420122 1.8404121
6   474116.31 .40806445 . -.34568962 1.8404121
7   850158.14 0 . .00063507 1.8404121
8   393389.59 .64389123 . -.51020128 1.8404121
9   233096.71 1.2186169 . -.51123244 1.8404121

beta[9,1]
            c1
c1   -.1145422
c2   .39599503
c3  -.03035683
c4   .01448319
c5  -.00400939
c6  -.02836676
c7   .01241607
c8   .17985262
c9   .33888442
6 1.4653399  1.2292145
   
1   525607.86 .28138957 1.7673005 -.62637705 1.8404121
2   286768.12 1.0130944 .68152148 -.55874735 1.8404121
3   498226.2 .34627545 .78557819 .42886427 1.8404121
4   460486.64 .44484001 1.1379539 2.7669497 1.8404121
5   494805.67 .35478164 . -.64420122 1.8404121
6   484532.81 .38084866 . -.34568962 1.8404121
7   872828.22 0 . .00063507 1.8404121
8   403799.4 .61115108 . -.51020128 1.8404121
9   282904.07 1.0275041 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.13552533
c2   .30885038
c3  -.04091225
c4   .02037091
c5   .00401932
c6  -.03923797
c7   .01610885
c8    .2258486
c9   .28274644
7 1.5427599  1.5135286
   
1   448637.89 .47785582 1.7673005 -.62637705 1.8404121
2   375279.89 .70236466 .68152148 -.55874735 1.8404121
3   414651.28 .57772067 .78557819 .42886427 1.8404121
4   364564.65 .7378389 1.1379539 2.7669497 1.8404121
5   395192.63 .63817411 . -.64420122 1.8404121
6   389388.02 .65664797 . -.34568962 1.8404121
7   787405.44 0 . .00063507 1.8404121
8   311331.5 .92303389 . -.51020128 1.8404121
9   271728.94 1.069532 . -.51123244 1.8404121

beta[9,1]
            c1
c1   -.1518357
c2    .1350841
c3  -.05850441
c4   .03869544
c5   .05855083
c6  -.06864563
c7    -.011601
c8    .3720984
c9   .30959515
8 1.5799025  1.5142701
   
1   436240.44 .5134131 1.7673005 -.62637705 1.8404121
2   370338.6 .71864414 .68152148 -.55874735 1.8404121
3   402645.27 .61474888 .78557819 .42886427 1.8404121
4   353649.65 .77462084 1.1379539 2.7669497 1.8404121
5   384800.8 .67138694 . -.64420122 1.8404121
6   378420.59 .69208879 . -.34568962 1.8404121
7   775802.16 0 . .00063507 1.8404121
8   299930.45 .9644979 . -.51020128 1.8404121
9   259324.26 1.1167802 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.14767851
c2   .13314664
c3  -.05715466
c4    .0375493
c5   .05931671
c6  -.06812244
c7  -.01547507
c8   .37937838
c9   .32597023
9 1.5630262  1.4617755
   
1   290916.98 .99769428 1.7673005 -.62637705 1.8404121
2   410243.19 .59121292 .68152148 -.55874735 1.8404121
3   256602.97 1.1272265 .78557819 .42886427 1.8404121
4   210858.54 1.3068615 1.1379539 2.7669497 1.8404121
5   244798.52 1.1728672 . -.64420122 1.8404121
6   235202.45 1.2103482 . -.34568962 1.8404121
7   630062.25 .09089107 . .00063507 1.8404121
8   155184.16 1.5342933 . -.51020128 1.8404121
9   193754.04 1.3758093 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.08105182
c2   .02739524
c3  -.04114763
c4   .02922032
c5   .07794838
c6  -.07322416
c7  -.04259713
c8   .58000923
c9   .35441273
10 1.4370411  .89464664
   
1   832817.53 0 1.7673005 -.62637705 1.8404121
2   283594.7 1.0249239 .68152148 -.55874735 1.8404121
3   835139.79 0 .78557819 .42886427 1.8404121
4   847568.54 0 1.1379539 2.7669497 1.8404121
5   886977.07 0 . -.64420122 1.8404121
6   863400.2 0 . -.34568962 1.8404121
7   1144170.6 0 . .00063507 1.8404121
8   795096.64 0 . -.51020128 1.8404121
9   543877.22 .24137065 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .01892039
c2   .54411617
c3  -.00032154
c4      .01109
c5   .04873738
c6   .00862735
c7  -.00926587
c8  -.06121702
c9  -.15547981
12 1.6314193  1.6780662
   
1   745326.61 .00122121 1.7673005 -.62637705 1.8404121
2   177837.54 1.4407348 .68152148 -.55874735 1.8404121
3   743502.55 .00154246 .78557819 .42886427 1.8404121
4   749604.91 .00061405 1.1379539 2.7669497 1.8404121
5   789132.09 0 . -.64420122 1.8404121
6   766814.48 0 . -.34568962 1.8404121
7   1069006.6 0 . .00063507 1.8404121
8   695459.72 .02310602 . -.51020128 1.8404121
9   448068.83 .47946549 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .00191928
c2   .71606571
c3   -.0118311
c4  -.02256053
c5   .08387476
c6   .01745947
c7  -.00057957
c8   -.0857124
c9  -.10737864
13 1.4101702  1.2200494
   
1   350636.93 .78488555 1.7673005 -.62637705 1.8404121
2   229855.34 1.2313753 .68152148 -.55874735 1.8404121
3   341672.55 .81570954 .78557819 .42886427 1.8404121
4   343248.05 .81026199 1.1379539 2.7669497 1.8404121
5   382772.93 .67794144 . -.64420122 1.8404121
6   360583.9 .75117889 . -.34568962 1.8404121
7   693161.88 .0247549 . .00063507 1.8404121
8   289664.65 1.0023349 . -.51020128 1.8404121
9   48507.007 1.9880497 . -.51123244 1.8404121

beta[9,1]
            c1
c1   -.0216573
c2   .15927072
c3  -.00719734
c4   .00151784
c5  -.00549267
c6  -.00484214
c7  -.00961081
c8   .03546946
c9    .8251855
15 1.3313468  .35527006
   
1   205632.84 1.3278313 1.7673005 -.62637705 1.8404121
2   714640.84 .01151164 .68152148 -.55874735 1.8404121
3   175383.88 1.4508053 .78557819 .42886427 1.8404121
4   142364.71 1.5877789 1.1379539 2.7669497 1.8404121
5   102928.68 1.7543812 . -.64420122 1.8404121
6   127771.8 1.6490898 . -.34568962 1.8404121
7   361294.15 .74879241 . .00063507 1.8404121
8   197005.24 1.3626359 . -.51020128 1.8404121
9   446072.8 .48512875 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .02796721
c2   .00081259
c3   .01720033
c4  -.05344519
c5   .81030397
c6   .01036148
c7   .11287187
c8  -.01349869
c9  -.07604631
16 1.2021919  .75307469
   
1   170061.84 1.4727027 1.7673005 -.62637705 1.8404121
2   630294.72 .09057593 .68152148 -.55874735 1.8404121
3   127371.73 1.6507767 .78557819 .42886427 1.8404121
4   64344.051 1.9197206 1.1379539 2.7669497 1.8404121
5   33950.718 2.0510156 . -.64420122 1.8404121
6   61936.405 1.9300942 . -.34568962 1.8404121
7   416416.5 .57235159 . .00063507 1.8404121
8   112487.06 1.7137449 . -.51020128 1.8404121
9   364663.73 .73750794 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.02041547
c2  -.00494568
c3  -.03952412
c4   .11469168
c5   .90389989
c6   -.0929781
c7   .01079948
c8   .07843745
c9  -.02192799
17 1.5774053  .27491196
   
1   207929.02 1.3186066 1.7673005 -.62637705 1.8404121
2   688713.3 .02810321 .68152148 -.55874735 1.8404121
3   171131.06 1.4682976 .78557819 .42886427 1.8404121
4   121494.03 1.6755938 1.1379539 2.7669497 1.8404121
5   84695.598 1.8322779 . -.64420122 1.8404121
6   112971.17 1.7116907 . -.34568962 1.8404121
7   397686.63 .63029793 . .00063507 1.8404121
8   171180.84 1.4680925 . -.51020128 1.8404121
9   423407.4 .55128033 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.01170402
c2  -.00411519
c3  -.01931181
c4   .00668359
c5   .87120967
c6  -.05143557
c7   .05948331
c8   .04330644
c9  -.06127406
18 1.3260681  .65537347
   
1   156840.51 1.5274099 1.7673005 -.62637705 1.8404121
2   438099.78 .50801542 .68152148 -.55874735 1.8404121
3   136716.51 1.6114579 .78557819 .42886427 1.8404121
4   138735.8 1.6029847 1.1379539 2.7669497 1.8404121
5   177679.13 1.4413845 . -.64420122 1.8404121
6   153461.77 1.5414579 . -.34568962 1.8404121
7   505787.42 .32778378 . .00063507 1.8404121
8   93850.156 1.7931086 . -.51020128 1.8404121
9   166196.54 1.4886519 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .14114802
c2  -.01698085
c3   .13593329
c4   .00079252
c5  -.08758856
c6  -.01365786
c7  -.02411852
c8   .52686358
c9   .32840919
19 1.4464088  .49252701
   
1   116869.46 1.6951644 1.7673005 -.62637705 1.8404121
2   491945.48 .36196118 .68152148 -.55874735 1.8404121
3   87377.548 1.8207912 .78557819 .42886427 1.8404121
4   87879.163 1.8186438 1.1379539 2.7669497 1.8404121
5   125688.5 1.657877 . -.64420122 1.8404121
6   100263.5 1.7657377 . -.34568962 1.8404121
7   461492 .44208297 . .00063507 1.8404121
8   57360.074 1.9498267 . -.51020128 1.8404121
9   219884 1.2708488 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .11839056
c2  -.00939179
c3   .24032058
c4   .06501023
c5  -.11052687
c6   .02445439
c7  -.01715562
c8   .55857157
c9   .13761114
20 1.7618494  .32876299
   
1   124093.72 1.6646093 1.7673005 -.62637705 1.8404121
2   516929.02 .30132949 .68152148 -.55874735 1.8404121
3   84400.115 1.833544 .78557819 .42886427 1.8404121
4   56638.894 1.952938 1.1379539 2.7669497 1.8404121
5   95893.771 1.7843803 . -.64420122 1.8404121
6   73697.451 1.8794753 . -.34568962 1.8404121
7   456918.74 .4546807 . .00063507 1.8404121
8   28233.443 2.0757788 . -.51020128 1.8404121
9   247253.49 1.1633323 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .03424807
c2  -.00318918
c3    .1605998
c4   .15713245
c5  -.08665128
c6   .04761707
c7  -.00786079
c8   .66333369
c9   .04478883
21 2.0024189  .18048976
   
1   130442.77 1.637836 1.7673005 -.62637705 1.8404121
2   498478.92 .34565047 .68152148 -.55874735 1.8404121
3   94908.046 1.7885896 .78557819 .42886427 1.8404121
4   75136.907 1.87329 1.1379539 2.7669497 1.8404121
5   114441.72 1.7054534 . -.64420122 1.8404121
6   91973.522 1.8011288 . -.34568962 1.8404121
7   469440.13 .42053452 . .00063507 1.8404121
8   35513.702 2.0442486 . -.51020128 1.8404121
9   228706.18 1.2359073 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .05890528
c2   -.0060062
c3   .15895207
c4   .06401577
c5  -.08629367
c6   .02447835
c7  -.01236596
c8   .70974156
c9   .09478502
22 1.6887209  .23984215
   
1   129601.96 1.6413772 1.7673005 -.62637705 1.8404121
2   476742.2 .40113012 .68152148 -.55874735 1.8404121
3   102369.25 1.7567641 .78557819 .42886427 1.8404121
4   100683.66 1.7639466 1.1379539 2.7669497 1.8404121
5   139241.76 1.600863 . -.64420122 1.8404121
6   114636.75 1.7046265 . -.34568962 1.8404121
7   475808.17 .40359102 . .00063507 1.8404121
8   62474.402 1.9277757 . -.51020128 1.8404121
9   205054 1.3301593 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .12216055
c2  -.01149272
c3   .19450125
c4   .03295947
c5  -.10133432
c6    .0079503
c7  -.01925458
c8   .59366006
c9   .18335449
23 1.6108231  .37058951
   
1   111775.75 1.7167638 1.7673005 -.62637705 1.8404121
2   478348.43 .39691278 .68152148 -.55874735 1.8404121
3   92675.716 1.7981272 .78557819 .42886427 1.8404121
4   111348.57 1.7185772 1.1379539 2.7669497 1.8404121
5   147450.08 1.5665178 . -.64420122 1.8404121
6   120409.69 1.6801792 . -.34568962 1.8404121
7   460534.72 .444708 . .00063507 1.8404121
8   83996.642 1.835273 . -.51020128 1.8404121
9   204981.65 1.3304504 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .21013103
c2  -.01416726
c3   .25574828
c4   .03825198
c5  -.11779264
c6   .00466731
c7  -.02061264
c8    .4430898
c9   .20285999
24 1.6767114  .42024956
   
1   82467.989 1.8418257 1.7673005 -.62637705 1.8404121
2   519051.35 .29639897 .68152148 -.55874735 1.8404121
3   53553.535 1.9662537 .78557819 .42886427 1.8404121
4   80165.655 1.8517002 1.1379539 2.7669497 1.8404121
5   112070.51 1.7155127 . -.64420122 1.8404121
6   83738.482 1.8363794 . -.34568962 1.8404121
7   426641.77 .54163651 . .00063507 1.8404121
8   75156.085 1.8732076 . -.51020128 1.8404121
9   245721.92 1.1692782 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .15624278
c2  -.00686201
c3   .43075674
c4   .10285827
c5  -.11825501
c6   .05089919
c7  -.01638809
c8   .32330897
c9   .08709547
26 2.0648148  .28584833
   
1   61685.319 1.9311764 1.7673005 -.62637705 1.8404121
2   536286.82 .25767147 .68152148 -.55874735 1.8404121
3   33850.536 2.0514494 .78557819 .42886427 1.8404121
4   82568.799 1.8413934 1.1379539 2.7669497 1.8404121
5   108380.9 1.7311836 . -.64420122 1.8404121
6   79562.332 1.8542888 . -.34568962 1.8404121
7   405195.4 .60681014 . .00063507 1.8404121
8   91086.418 1.8049218 . -.51020128 1.8404121
9   262778.75 1.103561 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .18335828
c2  -.00466124
c3   .57872111
c4   .07671532
c5  -.09395921
c6   .03954181
c7  -.01456557
c8   .18416576
c9   .05781814
27 2.1119554  .21880599
   
1   94744.321 1.7892889 1.7673005 -.62637705 1.8404121
2   497369.39 .34839799 .68152148 -.55874735 1.8404121
3   73471.496 1.8804464 .78557819 .42886427 1.8404121
4   98370.3 1.7738112 1.1379539 2.7669497 1.8404121
5   132509.81 1.6291364 . -.64420122 1.8404121
6   104661.71 1.7470026 . -.34568962 1.8404121
7   442690.71 .4947855 . .00063507 1.8404121
8   80963.879 1.8482759 . -.51020128 1.8404121
9   223934.55 1.2547735 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .21227194
c2  -.01115169
c3   .32977591
c4   .06281098
c5  -.12126591
c6   .01776378
c7  -.01909865
c8   .38741225
c9    .1473622
28 1.8278769  .36576843
   
1   86924.34 1.8227316 1.7673005 -.62637705 1.8404121
2   547821.7 .23308512 .68152148 -.55874735 1.8404121
3   43379.95 2.0102125 .78557819 .42886427 1.8404121
4   47895.921 1.9906903 1.1379539 2.7669497 1.8404121
5   77440.436 1.8633966 . -.64420122 1.8404121
6   49081.429 1.9855678 . -.34568962 1.8404121
7   414669.59 .5776649 . .00063507 1.8404121
8   65141.884 1.9162842 . -.51020128 1.8404121
9   275332.16 1.0559242 . -.51123244 1.8404121

beta[9,1]
            c1
c1    .0208534
c2  -.00191731
c3   .43535992
c4   .22627966
c5  -.11200458
c6   .20763228
c7  -.00828059
c8   .21935789
c9   .02410503
29 2.517368  .19045294
   
1   79922.805 1.8527421 1.7673005 -.62637705 1.8404121
2   512458.46 .31182961 .68152148 -.55874735 1.8404121
3   57834.086 1.947782 .78557819 .42886427 1.8404121
4   92048.142 1.8008098 1.1379539 2.7669497 1.8404121
5   123414.94 1.6674761 . -.64420122 1.8404121
6   94898.28 1.7886313 . -.34568962 1.8404121
7   427121.72 .54021114 . .00063507 1.8404121
8   84738.435 1.8320943 . -.51020128 1.8404121
9   238959.61 1.1956337 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .22131058
c2  -.00884309
c3   .40944328
c4    .0749827
c5  -.11743013
c6   .02570023
c7  -.01793283
c8   .30877604
c9   .11093352
30 1.9423004  .31959443
   
1   103392.53 1.7524059 1.7673005 -.62637705 1.8404121
2   508059.4 .32231202 .68152148 -.55874735 1.8404121
3   71226.272 1.8900992 .78557819 .42886427 1.8404121
4   76039.695 1.8694119 1.1379539 2.7669497 1.8404121
5   112337.51 1.7143795 . -.64420122 1.8404121
6   85815.058 1.8274821 . -.34568962 1.8404121
7   445823.39 .48583826 . .00063507 1.8404121
8   57323.189 1.9499858 . -.51020128 1.8404121
9   235608.74 1.2087546 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .10945838
c2  -.00719001
c3   .30739825
c4   .11027309
c5  -.11860449
c6   .04929879
c7  -.01539779
c8   .47793597
c9   .09750294
31 1.9784826  .29245432
   
1   177725.3 1.4411951 1.7673005 -.62637705 1.8404121
2   576037.88 .17760511 .68152148 -.55874735 1.8404121
3   131384.4 1.6338719 .78557819 .42886427 1.8404121
4   51567.04 1.974831 1.1379539 2.7669497 1.8404121
5   63654.796 1.9226898 . -.64420122 1.8404121
6   71247.686 1.8900071 . -.34568962 1.8404121
7   465531.79 .43107537 . .00063507 1.8404121
8   65092.349 1.9164976 . -.51020128 1.8404121
9   315264.2 .90887109 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.04525817
c2   -.0062867
c3  -.07958963
c4   .40253883
c5   .41762343
c6  -.13327571
c7  -.01243851
c8   .38817039
c9  -.00368875
33 2.5328164  .31336977
   
1   137693.49 1.6073574 1.7673005 -.62637705 1.8404121
2   648090.3 .06798488 .68152148 -.55874735 1.8404121
3   103170.83 1.75335 .78557819 .42886427 1.8404121
4   77504.092 1.8631233 1.1379539 2.7669497 1.8404121
5   40697.223 2.0218161 . -.64420122 1.8404121
6   57729.106 1.9482348 . -.34568962 1.8404121
7   365509.69 .73468463 . .00063507 1.8404121
8   135354.27 1.6171787 . -.51020128 1.8404121
9   377194.99 .6960921 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .05587946
c2  -.00321278
c3   .08255334
c4  -.10867787
c5   .78253326
c6   .17110933
c7   .05578402
c8  -.04409897
c9   -.0327044
34 1.0178983  .3039492
   
1   125353.94 1.659289 1.7673005 -.62637705 1.8404121
2   524920.14 .28294806 .68152148 -.55874735 1.8404121
3   83709.362 1.8365042 .78557819 .42886427 1.8404121
4   48075.186 1.9899156 1.1379539 2.7669497 1.8404121
5   87497.776 1.8202764 . -.64420122 1.8404121
6   66318.862 1.911216 . -.34568962 1.8404121
7   453971.94 .46287422 . .00063507 1.8404121
8   25196.055 2.0889405 . -.51020128 1.8404121
9   255720.91 1.1306187 . -.51123244 1.8404121

beta[9,1]
            c1
c1    .0199154
c2  -.00201097
c3   .13551898
c4   .22170295
c5  -.07698587
c6   .04973715
c7  -.00569512
c8   .64187531
c9    .0254296
37 2.1925324  .15381062
   
1   106668.51 1.7384642 1.7673005 -.62637705 1.8404121
2   533202.02 .2644293 .68152148 -.55874735 1.8404121
3   64874.983 1.9174337 .78557819 .42886427 1.8404121
4   46012.242 1.9988316 1.1379539 2.7669497 1.8404121
5   82892.312 1.8400065 . -.64420122 1.8404121
6   57613.545 1.9487333 . -.34568962 1.8404121
7   436381.73 .51300214 . .00063507 1.8404121
8   43979.93 2.007618 . -.51020128 1.8404121
9   262025.72 1.1064386 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .02897878
c2  -.00253134
c3    .2617683
c4   .27429118
c5  -.11282045
c6   .11612265
c7  -.00839794
c8   .42290421
c9   .03200247
38 2.4952922  .19948872
   
1   126540.82 1.654281 1.7673005 -.62637705 1.8404121
2   532646.69 .26565396 .68152148 -.55874735 1.8404121
3   83371.033 1.8379544 .78557819 .42886427 1.8404121
4   40056.77 2.0245869 1.1379539 2.7669497 1.8404121
5   79568.796 1.8542611 . -.64420122 1.8404121
6   59477.319 1.9406951 . -.34568962 1.8404121
7   450831.81 .47167047 . .00063507 1.8404121
8   25665.335 2.0869068 . -.51020128 1.8404121
9   263823.81 1.0995711 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .00925804
c2   -.0012962
c3   .11163232
c4   .31078262
c5  -.06549387
c6   .04714271
c7  -.00440432
c8   .58751542
c9   .01270071
39 2.4627798  .14083829
   
1   105132.88 1.7449973 1.7673005 -.62637705 1.8404121
2   544386.38 .24029397 .68152148 -.55874735 1.8404121
3   61037.859 1.9339671 .78557819 .42886427 1.8404121
4   36143.071 2.0415241 1.1379539 2.7669497 1.8404121
5   71910.715 1.887156 . -.64420122 1.8404121
6   46346.619 1.9973862 . -.34568962 1.8404121
7   428972.06 .53472985 . .00063507 1.8404121
8   48212.111 1.9893239 . -.51020128 1.8404121
9   273289.14 1.0636333 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .01202183
c2  -.00151473
c3   .25270546
c4   .36188446
c5  -.11285258
c6   .16909391
c7  -.00653996
c8   .31820213
c9   .01836786
40 2.7859249  .17625955
   
1   121085.56 1.6773209 1.7673005 -.62637705 1.8404121
2   549205.57 .23020854 .68152148 -.55874735 1.8404121
3   75822.536 1.8703446 .78557819 .42886427 1.8404121
4   24018.251 2.0940451 1.1379539 2.7669497 1.8404121
5   63251.433 1.9244276 . -.64420122 1.8404121
6   42803.275 2.0127064 . -.34568962 1.8404121
7   437369.94 .51013145 . .00063507 1.8404121
8   39394.308 2.0274532 . -.51020128 1.8404121
9   279903.28 1.0387384 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.00009748
c2  -.00074049
c3   .10853919
c4   .54562253
c5   -.0701087
c6   .08267991
c7  -.00373903
c8   .33919559
c9   .00492124
41 3.2381518  .13058677
   
1   134801.34 1.6195019 1.7673005 -.62637705 1.8404121
2   522125.76 .28931891 .68152148 -.55874735 1.8404121
3   92998.231 1.7967489 .78557819 .42886427 1.8404121
4   50619.807 1.9789221 1.1379539 2.7669497 1.8404121
5   90065.424 1.8092885 . -.64420122 1.8404121
6   71186.543 1.8902701 . -.34568962 1.8404121
7   462312.45 .43983823 . .00063507 1.8404121
8   15749.018 2.129897 . -.51020128 1.8404121
9   254229.5 1.136361 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .01268929
c2  -.00139755
c3   .08036324
c4   .15947097
c5  -.05002871
c6    .0253849
c7  -.00374936
c8   .76647702
c9   .01744613
42 1.9324321  .10993543
   
1   123903.34 1.6654133 1.7673005 -.62637705 1.8404121
2   530243.63 .27098178 .68152148 -.55874735 1.8404121
3   81314.411 1.8467724 .78557819 .42886427 1.8404121
4   42796.397 2.0127361 1.1379539 2.7669497 1.8404121
5   82191.393 1.8430116 . -.64420122 1.8404121
6   61088.263 1.9337499 . -.34568962 1.8404121
7   450185.16 .4734902 . .00063507 1.8404121
8   27218.202 2.0801777 . -.51020128 1.8404121
9   261003.92 1.1103468 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .01449424
c2  -.00163396
c3   .13444205
c4   .28243992
c5  -.07662153
c6   .05648487
c7  -.00520485
c8   .58618419
c9   .01863752
43 2.3926308  .15214845
   
1   136846.98 1.6109102 1.7673005 -.62637705 1.8404121
2   543862.36 .24140211 .68152148 -.55874735 1.8404121
3   91874.18 1.8015535 .78557819 .42886427 1.8404121
4   30548.872 2.0657482 1.1379539 2.7669497 1.8404121
5   68995.116 1.8996969 . -.64420122 1.8404121
6   54036.841 1.9641673 . -.34568962 1.8404121
7   452248.57 .4676935 . .00063507 1.8404121
8   27408.555 2.0793529 . -.51020128 1.8404121
9   276686.62 1.0508228 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.00704276
c2  -.00089335
c3   .03184532
c4   .46341162
c5   .00194424
c6  -.00917761
c7  -.00337865
c8   .52306566
c9  -.00165709
44 2.877113  .12513007
   
1   213179.42 1.2975758 1.7673005 -.62637705 1.8404121
2   460948.45 .44357271 .68152148 -.55874735 1.8404121
3   176318.03 1.4469694 .78557819 .42886427 1.8404121
4   130428.62 1.6378956 1.1379539 2.7669497 1.8404121
5   166185.35 1.4886982 . -.64420122 1.8404121
6   154337.48 1.5378144 . -.34568962 1.8404121
7   548680.14 .23129886 . .00063507 1.8404121
8   73745.218 1.87927 . -.51020128 1.8404121
9   209695.25 1.3115222 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.02910934
c2  -.00313884
c3  -.01724562
c4   .01877953
c5   .05515176
c6  -.06221937
c7  -.03026317
c8   .77499828
c9   .21354127
45 1.3863515  .51565673
   
1   151959.36 1.5477131 1.7673005 -.62637705 1.8404121
2   531569.46 .26803658 .68152148 -.55874735 1.8404121
3   108019.37 1.7327203 .78557819 .42886427 1.8404121
4   47624.053 1.9918651 1.1379539 2.7669497 1.8404121
5   84133.6 1.8346861 . -.64420122 1.8404121
6   71896.349 1.8872178 . -.34568962 1.8404121
7   470578.07 .4174857 . .00063507 1.8404121
8   14212.627 2.1365601 . -.51020128 1.8404121
9   266819.99 1.0881562 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.01258304
c2  -.00106592
c3  -.01144672
c4   .21473013
c5   .04414214
c6  -.03200791
c7  -.00347943
c8   .79237566
c9  -.00164709
46 2.0173249  .09980236
   
1   115840.97 1.699522 1.7673005 -.62637705 1.8404121
2   535264.09 .25990348 .68152148 -.55874735 1.8404121
3   72823.613 1.8832313 .78557819 .42886427 1.8404121
4   39646.244 2.0263631 1.1379539 2.7669497 1.8404121
5   78230.439 1.8600051 . -.64420122 1.8404121
6   55210.473 1.9591017 . -.34568962 1.8404121
7   441698.1 .49763412 . .00063507 1.8404121
8   35796.049 2.0430263 . -.51020128 1.8404121
9   265135.83 1.0945681 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .01580176
c2  -.00173851
c3    .1826701
c4   .33143261
c5  -.09576775
c6   .09270219
c7   -.0061502
c8   .47136784
c9   .02035606
49 2.6056281  .17047719
   
1   237781.42 1.2002426 1.7673005 -.62637705 1.8404121
2   482551.15 .38596594 .68152148 -.55874735 1.8404121
3   197112.16 1.3622033 .78557819 .42886427 1.8404121
4   137731.94 1.607196 1.1379539 2.7669497 1.8404121
5   168073.27 1.4809033 . -.64420122 1.8404121
6   162653.9 1.5033025 . -.34568962 1.8404121
7   562833.2 .20273167 . .00063507 1.8404121
8   88761.993 1.8148653 . -.51020128 1.8404121
9   241219.46 1.1868077 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.06734258
c2  -.00283331
c3  -.05858623
c4   .06782529
c5    .1445077
c6  -.09408197
c7  -.03676432
c8    .7407093
c9   .16841401
50 1.5221189  .64165681
   
1   294549.38 .98427293 1.7673005 -.62637705 1.8404121
2   316458.09 .904586 .68152148 -.55874735 1.8404121
3   275059.28 1.0569529 .78557819 .42886427 1.8404121
4   260561.91 1.1120387 1.1379539 2.7669497 1.8404121
5   299670.37 .96545071 . -.64420122 1.8404121
6   280701.38 1.0357467 . -.34568962 1.8404121
7   643587.35 .07341323 . .00063507 1.8404121
8   203913.23 1.3347504 . -.51020128 1.8404121
9   84079.759 1.8349168 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.03004444
c2   .04448229
c3  -.00128935
c4   .00115047
c5   .00151712
c6  -.02750775
c7  -.02431464
c8   .29238418
c9    .6857979
52 1.3457467  .56780229
   
1   248363.3 1.1590292 1.7673005 -.62637705 1.8404121
2   369584.01 .72114221 .68152148 -.55874735 1.8404121
3   225033.45 1.2504218 .78557819 .42886427 1.8404121
4   206651.87 1.3237354 1.1379539 2.7669497 1.8404121
5   245699.7 1.1693645 . -.64420122 1.8404121
6   227079.53 1.2423301 . -.34568962 1.8404121
7   597043.81 .14075735 . .00063507 1.8404121
8   149908.38 1.5562605 . -.51020128 1.8404121
9   118375.55 1.6887866 . -.51123244 1.8404121

beta[9,1]
            c1
c1    .0018611
c2   .00695826
c3    .0172339
c4  -.00309648
c5  -.00899274
c6  -.03545405
c7  -.03027603
c8   .45761991
c9    .5386926
53 1.3433362  .61050029
   
1   246621.12 1.1657862 1.7673005 -.62637705 1.8404121
2   390800.19 .65213534 .68152148 -.55874735 1.8404121
3   218897.24 1.2747732 .78557819 .42886427 1.8404121
4   191526.25 1.3848538 1.1379539 2.7669497 1.8404121
5   229753.24 1.2317778 . -.64420122 1.8404121
6   213385.14 1.2967536 . -.34568962 1.8404121
7   593259.38 .14710761 . .00063507 1.8404121
8   133731.19 1.6239999 . -.51020128 1.8404121
9   145022.18 1.5766614 . -.51123244 1.8404121

beta[9,1]
            c1
c1   -.0167762
c2   .00856862
c3   .00546835
c4   .00109881
c5   .00868341
c6  -.04547206
c7  -.03376015
c8   .54828608
c9   .44894892
54 1.3523686  .65867198
   
1   253370.18 1.1396734 1.7673005 -.62637705 1.8404121
2   367304.73 .7287069 .68152148 -.55874735 1.8404121
3   229662.53 1.2321354 .78557819 .42886427 1.8404121
4   210054.28 1.3100833 1.1379539 2.7669497 1.8404121
5   248983 1.1566285 . -.64420122 1.8404121
6   230740.3 1.2278884 . -.34568962 1.8404121
7   601959.74 .13270036 . .00063507 1.8404121
8   153047.17 1.5431835 . -.51020128 1.8404121
9   118896.18 1.6865829 . -.51123244 1.8404121

beta[9,1]
            c1
c1  -.00540612
c2   .01046537
c3   .01290313
c4  -.00199531
c5  -.00483217
c6   -.0366627
c7  -.03070934
c8   .45544608
c9   .54069085
55 1.3449431  .62339131
   
1   221273.32 1.2653289 1.7673005 -.62637705 1.8404121
2   369157.92 .72255418 .68152148 -.55874735 1.8404121
3   205585.89 1.3280201 .78557819 .42886427 1.8404121
4   204465.62 1.3325268 1.1379539 2.7669497 1.8404121
5   243935.87 1.176223 . -.64420122 1.8404121
6   221300.88 1.2652195 . -.34568962 1.8404121
7   569842.17 .18920884 . .00063507 1.8404121
8   152859.71 1.5439639 . -.51020128 1.8404121
9   99868.342 1.7674224 . -.51123244 1.8404121

beta[9,1]
            c1
c1    .0783136
c2   -.0141963
c3    .0538701
c4  -.00793164
c5  -.04629156
c6  -.02188139
c7  -.02458116
c8   .36582304
c9   .59314472
56 1.3479383  .52203941
   
1   198040.58 1.3584475 1.7673005 -.62637705 1.8404121
2   380344.98 .68582017 .68152148 -.55874735 1.8404121
3   189630.36 1.392562 .78557819 .42886427 1.8404121
4   203399.71 1.3368183 1.1379539 2.7669497 1.8404121
5   241912.74 1.1841037 . -.64420122 1.8404121
6   216629.5 1.2838042 . -.34568962 1.8404121
7   543647.31 .24185751 . .00063507 1.8404121
8   158647.56 1.5199076 . -.51020128 1.8404121
9   106867.57 1.7376176 . -.51123244 1.8404121

beta[9,1]
            c1
c1   .16584539
c2  -.02183633
c3   .08326506
c4  -.00742081
c5  -.07533936
c6  -.01674699
c7  -.02199075
c8   .29828958
c9   .57572269
57 1.3717009  .54413725
   
1   800403.46 0 1.7673005 -.62637705 1.8404121
2   247714.83 1.161543 .68152148 -.55874735 1.8404121
3   801883.97 0 .78557819 .42886427 1.8404121
4   813131.94 0 1.1379539 2.7669497 1.8404121
5   852576.11 0 . -.64420122 1.8404121
6   829216.55 0 . -.34568962 1.8404121
7   1114716.4 0 . .00063507 1.8404121
8   760353.32 0 . -.51020128 1.8404121
9   509614.3 .31858996 . -.51123244 1.8404121

beta[9,1]
            c1
c1    .0135034
c2   .60070231
c3  -.00266132
c4   .01325731
c5    .0605764
c6   .01129544
c7   -.0070982
c8  -.08673428
c9  -.13752357
58 1.6034798  1.5442877
   

. 
. matrix ones58==J(1,58,1)

. matrix sum_mao=ones58*mao

. matrix list sum_mao

sum_mao[1,3]
        c1      c2      c3
r1    9075   15089  987319

. 
. di sqrt(sum_mao[1,3])
993.63927

. matrix list mao

mao[58,3]
         c1      c2      c3
 r1     151     201   11384
 r2       1       2       2
 r3      23      34     705
 r4      46      66    2453
 r5     105     187   23604
 r6      18      26     398
 r7      12      19     218
 r8       5       8      38
 r9      36      56    1894
r10      21      30     395
r11     570     692    9245
r12      32      52    1718
r13      12      17     176
r14    1270    1628   41590
r15      95     126    3206
r16      52      63    2036
r17      57      90     893
r18      54      72    1911
r19     166     240   13572
r20     347     611   39586
r21      23      46      95
r22      60     101     863
r23     174     280   11220
r24     130     218    7102
r25     422     958    8703
r26     205     423   12013
r27     127     268    3529
r28      82     150    2459
r29      98     247    1829
r30     132     256    5569
r31     252     499   18572
r32     163     751  219030
r33     190     481   11313
r34     114     116    3950
r35     246     294    2854
r36     426     637   33628
r37     169     371    4393
r38      12      30      29
r39      21      52      62
r40     225     627    8923
r41      21      68      58
r42      81     157     721
r43      28      67     119
r44       6      17       5
r45     409     567   86260
r46     123     248    1510
r47     258     475    7403
r48     320     426   15028
r49       8      21      11
r50      82     125    4315
r51     321     427   15028
r52     159     214   14355
r53      27      36     445
r54       7       9      32
r55      26      35     421
r56      72      97    2706
r57     776    1064  327666
r58       7      11      76

. 
. scalar nestim2=nestim/sum_mao[1,1]

. di nlags,nestim,nestim2
4 3996 .44033058

. 
end of do-file

mao[58,3]
         c1      c2      c3
 r1     151     201   11384
 r2       1       2       2
 r3      23      34     705
 r4      46      66    2453
 r5     105     187   23604
 r6      18      26     398
 r7      12      19     218
 r8       5       8      38
 r9      36      56    1894
r10      21      30     395
r11     570     692    9245
r12      32      52    1718
r13      12      17     176
r14    1270    1628   41590
r15      95     126    3206
r16      52      63    2036
r17      57      90     893
r18      54      72    1911
r19     166     240   13572
r20     347     611   39586
r21      23      46      95
r22      60     101     863
r23     174     280   11220
r24     130     218    7102
r25     422     958    8703
r26     205     423   12013
r27     127     268    3529
r28      82     150    2459
r29      98     247    1829
r30     132     256    5569
r31     252     499   18572
r32     163     751  219030
r33     190     481   11313
r34     114     116    3950
r35     246     294    2854
r36     426     637   33628
r37     169     371    4393
r38      12      30      29
r39      21      52      62
r40     225     627    8923
r41      21      68      58
r42      81     157     721
r43      28      67     119
r44       6      17       5
r45     409     567   86260
r46     123     248    1510
r47     258     475    7403
r48     320     426   15028
r49       8      21      11
r50      82     125    4315
r51     321     427   15028
r52     159     214   14355
r53      27      36     445
r54       7       9      32
r55      26      35     421
r56      72      97    2706
r57     776    1064  327666
r58       7      11      76

sum_mao[1,3]
        c1      c2      c3
r1    9075   15089  987319

modelmat[7,1]
    c1
r1   5
r2   0
r3   0
r4   2
r5   0
r6   0
r7   2
perpe:  2
depmean:  1.8404121
depvar:  2.1982156
depvar1:  1.2000804
depvar2:  .99813525
nlags:  4
nstrata:  9
nestim:  3996
nestimratio:  .44033058
nestime:  6286.6928
nestimv:  352509.38

. * This program estimates total population analytically and performs the kriging geographical interppolation
. scalar diestim=0

. scalar nestim=0

. scalar nestime=0

. scalar nestimv=0

. ******************************
. matrix mao=J(nstrata,3,0)

. matrix modelmat=J(7, 1, 0)

. forval ii = 1/58{   /* begin loop strata */
  2. scalar jhat=`ii'
  3. scalar jj1=(jhat-1)*8*3+(perpeh-1)*8+1
  4. scalar jj2=jj1+6
  5. 
. matrix a=yy[jj1..jj2,1]              /*original data*/
  6. run "$code\analya"
  7. matrix mao[jhat,1]=ntotalm
  8. if modeli>0 & (perpeh~=2 | jhat~=57) & (perpeh~=3 | jhat~=52) {           /* Original*/
  9. matrix modelmat[modeli,1]=modelmat[modeli,1]+1
 10. matrix mao[jhat,2]=nmv[modeli, 1]
 11. matrix mao[jhat,3]=nmv[modeli, 2]
 12. scalar diestim=diestim+1
 13. scalar nestim=nestim+mao[jhat,1]
 14. scalar nestime=nestime+mao[jhat,2]
 15. scalar nestimv=nestimv+mao[jhat,3]
 16. 
. matrix reportmo=nmv,prm,chi2ml,dfml
 17. 
. forval ii= 1/7{
 18. matrix reportmo[`ii',2]=sqrt(reportmo[`ii',2])
 19. matrix reportmo[`ii',4]=reportmo[`ii',4]/reportmo[`ii',5]
 20. }
 21. 
. di perpeh,jhat
 22. matrix reportmo=reportmo[1..7,1..4]
 23. matrix list reportmo
 24. }
 25. 
. 
. } /* end loop strata*/
3 1

reportmo[7,4]
           c1         c2         c1         c1
r1  1022.5338  475.47282  2.075e-06  9.7190419
r2      997.5  462.69692          .          .
r3        139          0          .          .
r4  1317.3333  719.31861          .          .
r5  1283.6667  699.57744          .          .
r6        139          0          .          .
r7          0          0          0          .
3 4

reportmo[7,4]
           c1         c2         c1         c1
r1  295.13259  274.80884  .02380217  3.1520587
r2          0          0          0          .
r3         40          0          .          .
r4        288  267.25269          .          .
r5          0          0          0          .
r6          0          0          0          .
r7         40          0          .          .
3 9

reportmo[7,4]
           c1         c2         c1         c1
r1  170.15371  100.08441  .38069199  1.0239222
r2        288   260.1538          .          .
r3         53          0          .          .
r4        168  98.285299          .          .
r5        283  254.67627          .          .
r6          0          0          0          .
r7         53          0          .          .
3 11

reportmo[7,4]
           c1         c2         c1         c1
r1  942.79363  334.53435  1.806e-07  11.396641
r2        876    335.378  4.433e-10  21.536778
r3       1374   1251.543  1.695e-10  22.498246
r4       1070  422.97045  .07196474  2.6315789
r5    1017.75  445.24124  .01430588          6
r6          0          0          0          .
r7          0          0          0          .
3 12

reportmo[7,4]
           c1         c2         c1         c1
r1  441.78312  142.04474  .09771272   2.101399
r2      463.5  161.94559  .02598778  3.6501289
r3      184.5  74.706927  .48195323   .7299082
r4  488.16667  172.13078  .51127521  .67084727
r5        523  203.70567  .38647623        .75
r6        145  30.397368  .81859225  .05260417
r7        219  135.05554  .62709996  .23601399
3 14

reportmo[7,4]
           c1         c2         c1         c1
r1  8592.7361  2607.6942  .00034399  6.1724294
r2  8818.3333  2822.2759  .00006436  9.6510058
r3       2720  1356.9967   .1282926  2.0534417
r4      10404  3554.4841  .74467841  .29480282
r5  10949.571  4004.0289  .64042879  .21818182
r6       1292  474.89157  .90901768  .01305939
r7       5513  5089.6837  .74661046  .10440134
3 16

reportmo[7,4]
           c1         c2         c1         c1
r1   16.51561  11.308199  4.996e-07  10.698557
r2          9          0          .          .
r3          9          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6          9          0          .          .
r7          0          0          0          .
3 17

reportmo[7,4]
           c1         c2         c1         c1
r1  26.884099  13.953955  3.184e-06  9.4240163
r2         18  6.7082039          .          .
r3         13          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6         13          0          .          .
r7          0          0          0          .
3 20

reportmo[7,4]
           c1         c2         c1         c1
r1   151.8004  49.094475  6.874e-11  16.768837
r2        132  53.272882  4.653e-10  21.488372
r3  117.33333  33.288859  5.072e-10  21.402168
r4        215  116.38299  .65924063  .41666667
r5          0          0          0          .
r6         90          2  7.090e-11  42.494118
r7        173  119.49895  .38647623        .75
3 23

reportmo[7,4]
           c1         c2         c1         c1
r1     50.505  35.353572          0    33.3434
r2         26          0          .          .
r3         26          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6         26          0          .          .
r7          0          0          0          .
3 25

reportmo[7,4]
           c1         c2         c1         c1
r1  40.950187  9.1224669  .02884335  3.0113051
r2       43.5  11.659224          .          .
r3         31          0          .          .
r4       43.5  11.659224          .          .
r5  47.666667   16.10153          .          .
r6          0          0          0          .
r7          0          0          0          .
3 26

reportmo[7,4]
           c1         c2         c1         c1
r1   187.3381  152.27558          0   46.58676
r2        126  88.385519          .          .
r3         64          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6         64          0          .          .
r7          0          0          0          .
3 28

reportmo[7,4]
           c1         c2         c1         c1
r1  64.551819  28.439715  7.089e-13   19.87312
r2  43.333333  14.882254          .          .
r3         28          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6         28          0          .          .
r7          0          0          0          .
3 32

reportmo[7,4]
           c1         c2         c1         c1
r1  166.64278  60.993889  2.578e-10  15.869966
r2      164.5  66.490131  6.224e-11       23.5
r3         57          0          .          .
r4        616  586.80832          .          .
r5          0          0          0          .
r6         57          0          .          .
r7          0          0          0          .
3 36

reportmo[7,4]
           c1         c2         c1         c1
r1  138.25929  28.772348          0  50.798229
r2       81.4  7.2177559  6.301e-12  25.790309
r3       87.6  10.505998  4.060e-13  28.532422
r4        441  284.08273  .10687332  2.2361111
r5        136   86.97126  .07044043  3.2727273
r6  75.222222  .54934804  .89813297  .01638918
r7        197  150.63864  .02609067       4.95
3 37

reportmo[7,4]
           c1         c2         c1         c1
r1  290.51592  113.07707  8.201e-11  16.648839
r2        522  341.94736  5.670e-09  18.988095
r3  163.33333  69.740259  9.807e-11   23.04535
r4        414  216.61025  .00034453  7.9733333
r5          0          0          0          .
r6          0          0          0          .
r7        278  230.30415  .00002209         18
3 40

reportmo[7,4]
           c1         c2         c1         c1
r1  85.343831  68.991672  1.175e-13  21.090898
r2         58  40.298883          .          .
r3         30          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6         30          0          .          .
r7          0          0          0          .
3 43

reportmo[7,4]
           c1         c2         c1         c1
r1  29.376659  15.324407  8.397e-07  10.341766
r2       19.5  7.3229093          .          .
r3         14          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6         14          0          .          .
r7          0          0          0          .
3 45

reportmo[7,4]
           c1         c2         c1         c1
r1  487.95876  212.52927          0  59.113634
r2        385  159.70676          .          .
r3        120          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6        120          0          .          .
r7          0          0          0          .
3 48

reportmo[7,4]
           c1         c2         c1         c1
r1  320.15666  293.93858  2.249e-13  20.650813
r2        276  249.19872          .          .
r3         51          0          .          .
r4          0          0          0          .
r5          0          0          0          .
r6         51          0          .          .
r7          0          0          0          .
3 49

reportmo[7,4]
           c1         c2         c1         c1
r1  7.1622777  2.9612624   .0705944   2.347085
r2          5          0          .          .
r3          6  1.7320508          .          .
r4          0          0          0          .
r5          0          0          0          .
r6          5          0          .          .
r7          0          0          0          .
3 55

reportmo[7,4]
           c1         c2         c1         c1
r1   40.35573  32.246704  .35576741  1.0807363
r2         15          0          .          .
r3          0          0          0          .
r4         39  30.594117          .          .
r5         15          0          .          .
r6          0          0          0          .
r7          0          0          0          .
3 56

reportmo[7,4]
           c1         c2         c1         c1
r1  109.34151  88.588098  .85297806  .26176903
r2          0          0          0          .
r3         74  51.613952          .          .
r4        108   86.94826          .          .
r5          0          0          0          .
r6          0          0          0          .
r7         73  50.199602          .          .

. 
. matrix list mao

mao[58,3]
            c1         c2         c3
 r1        139  1022.5338  226074.41
 r2          5          0          0
 r3         14          0          0
 r4         40  295.13259    75519.9
 r5         58          0          0
 r6          3          0          0
 r7         19          0          0
 r8         11          0          0
 r9         53  170.15371   10016.89
r10          0          0          0
r11        234       1070     178904
r12        124      184.5   5581.125
r13         33          0          0
r14        689       2720    1841440
r15        101          0          0
r16          9   16.51561  127.87537
r17         13  26.884099  194.71285
r18          6          0          0
r19         29          0          0
r20         89        173      14280
r21         21          0          0
r22          8          0          0
r23         26     50.505   1249.875
r24         45          0          0
r25         31  40.950187  83.219403
r26         64   187.3381  23187.851
r27         46          0          0
r28         28  64.551819  808.81737
r29          6          0          0
r30         60          0          0
r31         34          0          0
r32         57  166.64278  3720.2545
r33         33          0          0
r34          8          0          0
r35        103          0          0
r36         75        441      80703
r37         74        414      46920
r38          2          0          0
r39          2          0          0
r40         30  85.343831  4759.8508
r41         23          0          0
r42         20          0          0
r43         14  29.376659  234.83744
r44          2          0          0
r45        120  487.95876  45168.692
r46         11          0          0
r47         81          0          0
r48         51  320.15666  86399.888
r49          5  7.1622777  8.7690748
r50          6          0          0
r51        140          0          0
r52        119          0          0
r53         21          0          0
r54          8          0          0
r55         15   40.35573  1039.8499
r56         38  109.34151   7847.851
r57        167          0          0
r58         46          0          0

. 
. 
. 
. clear

. svmat mao, names(v)
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58

. 
. *1.       Create vector of values.
. g dep=v2/v1
(1 missing value generated)

. g dep2=v3/(v1*v1)
(1 missing value generated)

. 
. 
. 
. g i=_n

. sort i

. 
. merge 1:1 i using "${geocoord}\distxy"  /* Coordinates */

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                                58  (_merge==3)
    -----------------------------------------

. drop _merge

. mkmat x_di

. mkmat y_di

. 
. ren x_di x

. ren y_di y

. 
. drop if dep==0 | dep==.
(35 observations deleted)

. 
. *2.       Calculate variogram
. variog2 dep x y , width(190000) lags(10)   list g(sem)

  +----------------------------------+
  | Lag   Semi-variance   # of pairs |
  |----------------------------------|
  |   1       2.4999418          134 |
  |   2       2.6428336           45 |
  |   3       7.1053871           40 |
  |   4       5.8057306           20 |
  |   5         2.93085           13 |
  |----------------------------------|
  |   6        .0602616            1 |
  +----------------------------------+

. 
. sum dep

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         dep |        23    3.433991    1.878115   1.320974   7.378315

. scalar depmean=r(mean) 

. scalar depvar1=r(Var) 

. replace dep=dep-depmean
(23 real changes made)

. 
. sum dep2

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        dep2 |        23     6.97597    11.28538   .0865967   47.19994

. scalar depvar2=r(mean) 

. scalar depvar=depvar1+ depvar2

. 
. 
. mkmat dep

. mkmat sem

. mkmat x

. mkmat y

. drop if sem==.
(17 observations deleted)

. scalar nlags=_N

. clear

. 
. scalar nv=rowsof(dep)

. *matrix ones=J(1,nv,1)
. *matrix depmean=ones*dep/nv
. 
. scalar variance=0.

. scalar i=1

. while i<=nlags{
  2. scalar variance=max(variance,sem[i,1])
  3. scalar i=i+1
  4. }

. scalar variance=depvar

. di variance
10.503286

. 
. scalar rangex=nlags*190000

. 
. matrix sem=sem*depvar/variance

. matrix sem=sem[1..nlags,.]

. *scalar variance=depvar
. 
. *4. Variogram matrix
. matrix varmar==J(nv,nv,0)

. scalar i=1

. while i<=nv{
  2. *matrix dep[i,1]=dep[i,1]-depmean[1,1]
. 
. matrix varmar[i,i]=variance
  3. scalar j=1
  4. while j<i{
  5. scalar distance= sqrt((x[i,1] - x[j,1])* (x[i,1] - x[j,1]) + (y[i,1] - y[j,1])* (y[i,1] - y[j,1]))
  6. 
. scalar disran=distance/rangex
  7. scalar semico=variance*(1.5*disran-0.5*disran*disran*disran)                               /*3.       Estimate variogram 
> */
  8. if disran>1{
  9. scalar semico=variance
 10. }
 11. 
. matrix varmar[i,j]=variance-semico
 12. matrix varmar[j,i]= varmar[i,j]
 13. scalar j=j+1
 14. }
 15. scalar i=i+1
 16. }

. 
. * Calculate variogram matrix
. matrix list varmar

symmetric varmar[23,23]
            c1         c2         c3         c4         c5         c6         c7         c8         c9        c10        c11
 r1  10.503286
 r2  7.3983513  10.503286
 r3  5.0981092  6.6436711  10.503286
 r4  3.3791607  2.8193534  4.7686724  10.503286
 r5  6.7715479  5.4403111  2.5427395  1.0411833  10.503286
 r6  9.6267986  8.2409647  5.5652084  3.2307731  6.6648245  10.503286
 r7  1.9209175  1.9292485  4.4029922   7.692239  .26112514  1.9206003  10.503286
 r8  2.6575095  2.7158142  5.3984828  8.1704467   .6105335  2.6801302  9.3029186  10.503286
 r9  4.1706504  3.8983251  6.2049709  8.8937956  1.5300596  4.1265626  7.3964319  8.4149776  10.503286
r10  4.3369703  4.0700198  6.3625211  8.7198891  1.6432547  4.2987437  7.2113571   8.249327  10.288253  10.503286
r11  3.3782754  2.9905501  5.1700751  9.8632026  1.0262654  3.2825645  8.0985841  8.7503196  9.2980836  9.0923345  10.503286
r12  3.9015595  3.5441539  5.7678065  9.3655576  1.3535439  3.8256295  7.6356347    8.53889  10.019853  9.8232204   9.763715
r13   4.148013  3.7506023  5.9104978  9.1969239  1.5177403  4.0657168  7.3473104  8.2764447  10.132537  10.009367  9.4893079
r14  3.2584773  3.1912419  5.7725916  8.7656478  .94805971   3.255108   8.546018  9.6149887  9.2911921  9.1154447  9.4005644
r15  3.0974693  2.9694397   5.465561  8.9635918  .85247974  3.0737308  8.7448598  9.6481605  9.1212063  8.9243338  9.5804983
r16  3.7690922   3.652351  6.1736901  8.7778631  1.2655779   3.761527  7.8962655  8.9796895  9.9071835  9.7600916  9.3484928
r17  3.5806018  3.4042474  5.8579094  9.0544572  1.1449299  3.5516815  8.1199952  9.1227359  9.7569662  9.5606369  9.6605424
r18  3.7116053  3.5979931  6.1253178  8.7976708  1.2286248   3.703713  7.9675303  9.0484318  9.8478895  9.6928357  9.3814179
r19  4.3790922  4.5893207  7.4058403  7.5914639  1.6970613  4.4800929    6.94322  8.1003304   9.143957  9.2573108  8.0859812
r20  3.8118288  3.8051945  6.4538541  8.4347651  1.2966844  3.8370091  7.8077544  8.9537478  9.7112327  9.6407475  9.0081601
r21  3.6667329  3.5242438  6.0180726  8.9078613  1.1995624  3.6494828  8.0223853  9.0741224  9.8360178  9.6595367  9.4982249
r22  5.5076295  5.5565645  7.7912915  7.0593382  2.5168825  5.6027482  5.8205511  6.9192927    8.54501  8.7513814  7.3722631
r23  5.5942271  5.2653233  7.1265113  7.4836672  2.5578024  5.5798091  5.8579401  6.9091447  8.8081387  9.0183863  7.6928667

           c12        c13        c14        c15        c16        c17        c18        c19        c20        c21        c22
r12  10.503286
r13  10.196592  10.503286
r14  9.3972142   9.147172  10.503286
r15  9.3480925  9.0609136  10.158774  10.503286
r16  9.7883083   9.652564  9.8392758  9.5877862  10.503286
r17  9.8874096  9.6440996  10.003953  9.8631238  10.156903  10.503286
r18  9.7722949  9.6135913  9.9121133  9.6598478  10.429714  10.209098  10.503286
r19  8.7004089  8.7849912  8.7086131  8.3833565  9.1973885  8.8545827  9.1438805  10.503286
r20  9.4661256  9.3862378  9.7030488  9.3861472  10.155131  9.8373869  10.127199  9.4855408  10.503286
r21  9.8420893   9.649115  9.9555918   9.740868  10.331108  10.327381  10.384032  9.0285469  10.008744  10.503286
r22  8.0854499  8.3164232  7.6331655  7.3579756  8.2451681  7.9369585  8.1753324  9.1973334  8.4008646  8.0866518  10.503286
r23   8.406747  8.6849535  7.7078483  7.4833007  8.3548453  8.1005869  8.2828801  8.8953672  8.4034087  8.2207314  9.7882881

           c23
r23  10.503286

. matrix varinv=inv(varmar)

. 
. *5.       Calculate variogram vector to estimation point
. forval i = 1/58{
  2. 
. if  mao[`i',2]==0{
  3. 
. matrix varvec=J(nv,1,0)
  4. 
. scalar j=1
  5. while j<=nv{
  6. scalar distance= sqrt((x_di[`i',1] - x[j,1])* (x_di[`i',1] - x[j,1]) + (y_di[`i',1] - y[j,1])* (y_di[`i',1] - y[j,1]))
  7. scalar disran=distance/rangex
  8. scalar semico=variance*(1.5*disran-0.5*disran*disran*disran)          /*3.       Estimate variogram */
  9. if disran>1{
 10. scalar semico=variance
 11. }
 12. di j "   " distance  " " variance-semico " " sem[j,1] " " dep[j,1] " " depmean
 13. matrix varvec[j,1]=variance-semico
 14. scalar j=j+1
 15. }
 16. matrix beta=varinv*varvec
 17. matrix list beta
 18. matrix dephat=dep'*beta+depmean
 19. matrix va=variance- varvec'*beta
 20. di `i' " " dephat[1,1] "  " va[1,1]
 21. di "   "
 22. *matrix list beta
. matrix mao[`i',2]=mao[`i',1]*dephat[1,1]
 23. matrix mao[`i',3]=mao[`i',1]*mao[`i',1]*(variance- varvec'*beta)
 24. }
 25. matrix mao[`i',2]=int(mao[`i',2]+0.5)
 26. matrix mao[`i',3]=int(mao[`i',3]+0.5)
 27. 
. }
1   407997.88 5.1054527 2.4999418 3.9223666 3.4339914
2   274435.19 6.7838266 2.6428337 3.9443235 3.4339914
3   19248.038 10.237302 7.1053872 -.22354409 3.4339914
4   455204.28 4.5466602 5.8057308 1.138658 3.4339914
5   638744.4 2.5995322 2.93085 -1.9460882 3.4339914
6   367275.31 5.6031126 .0602616 .5137589 3.4339914
7   486174.32 4.1916417 . -1.5989237 3.4339914
8   402682.23 5.1696281 . -1.365984 3.4339914
9   338349.79 5.9645564 . -1.4901712 3.4339914
10   325916.4 6.1218002 . -1.4914914 3.4339914
11   421802.24 4.9399473 . -2.1130176 3.4339914
12   373050.12 5.5317187 . -.50683379 3.4339914
13   361477.26 5.6750559 . -1.1285694 3.4339914
14   372855.61 5.5341191 . -.51043391 3.4339914
15   397635.48 5.2307809 . 2.4460087 3.4339914
16   341066.33 5.9303473 . 2.160603 3.4339914
17   366070.55 5.61804 . -.58919692 3.4339914
18   344880.42 5.8824072 . -1.3356586 3.4339914
19   246362.21 7.151536 . .63233185 3.4339914
20   319178.48 6.2074644 . 2.8435903 3.4339914
21   353346.94 5.7763729 . -2.0015359 3.4339914
22   215551.88 7.5598357 . -.74360967 3.4339914
23   265026.64 6.9065738 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00514435
 c2   .05735759
 c3   .95082316
 c4  -.00560748
 c5  -.00611014
 c6  -.00096697
 c7  -.00139439
 c8   .00354068
 c9   .00023719
c10  -.00195215
c11  -.00044513
c12   .00023732
c13  -.00174526
c14   .00080918
c15  -.00162891
c16  -.00034324
c17   .00002013
c18   .00012378
c19  -.00144503
c20   .00113188
c21   .00002118
c22  -.00230128
c23   -.0029118
2 3.4355278  .50817759
   
1   285724.6 6.6372244 2.4999418 3.9223666 3.4339914
2   124575.55 8.7884912 2.6428337 3.9443235 3.4339914
3   160659.52 8.297653 7.1053872 -.22354409 3.4339914
4   525302.71 3.7573616 5.8057308 1.138658 3.4339914
5   492636.58 4.1187925 2.93085 -1.9460882 3.4339914
6   234217.71 7.311916 .0602616 .5137589 3.4339914
7   601422.65 2.9626735 . -1.5989237 3.4339914
8   514728.11 3.873094 . -1.365984 3.4339914
9   414520.63 5.0270396 . -1.4901712 3.4339914
10   399604 5.206902 . -1.4914914 3.4339914
11   501893.94 4.015198 . -2.1130176 3.4339914
12   448787 4.6214056 . -.50683379 3.4339914
13   431724.48 4.8220387 . -1.1285694 3.4339914
14   471956.33 4.3534334 . -.51043391 3.4339914
15   495155.38 4.0905163 . 2.4460087 3.4339914
16   431122.62 4.8291651 . 2.160603 3.4339914
17   455502.5 4.5431964 . -.58919692 3.4339914
18   435893.99 4.7727598 . -1.3356586 3.4339914
19   341983.38 5.918811 . .63233185 3.4339914
20   414245.39 5.0303409 . 2.8435903 3.4339914
21   443458.4 4.6837696 . -2.0015359 3.4339914
22   272533.18 6.8085998 . -.74360967 3.4339914
23   306866.91 6.3647818 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .00960636
 c2   .51778057
 c3    .4000878
 c4  -.00599379
 c5  -.03316495
 c6   .05931282
 c7  -.01065987
 c8  -.00642545
 c9   .00104132
c10  -.00876862
c11   .00052063
c12   .00061919
c13  -.00255412
c14  -.00194435
c15   .00176584
c16   .00083281
c17   .00089003
c18  -.00023819
c19  -.02636505
c20  -.00632682
c21   .00029538
c22    .0693342
c23   .03029125
3 5.454768  1.9148512
   
1   548282.71 3.5102011 2.4999418 3.9223666 3.4339914
2   487448.84 4.1772396 2.6428337 3.9443235 3.4339914
3   763869.84 1.5264517 7.1053872 -.22354409 3.4339914
4   1083865.5 .03757328 5.8057308 1.138658 3.4339914
5   360197.27 5.6909733 2.93085 -1.9460882 3.4339914
6   515187.69 3.8680386 .0602616 .5137589 3.4339914
7   1199448.4 0 . -1.5989237 3.4339914
8   1112516.9 .00908313 . -1.365984 3.4339914
9   989926.86 .26105057 . -1.4901712 3.4339914
10   974370.19 .31646421 . -1.4914914 3.4339914
11   1073324.3 .05284342 . -2.1130176 3.4339914
12   1020485.8 .16710817 . -.50683379 3.4339914
13   999853.25 .22835007 . -1.1285694 3.4339914
14   1062142.6 .07181338 . -.51043391 3.4339914
15   1082975.8 .03876342 . 2.4460087 3.4339914
16   1016702.2 .17765224 . 2.160603 3.4339914
17   1038933.3 .12016979 . -.58919692 3.4339914
18   1021900.8 .16324442 . -1.3356586 3.4339914
19   937264.82 .4687332 . .63233185 3.4339914
20   1004612.1 .2134148 . 2.8435903 3.4339914
21   1028249.2 .14644693 . -2.0015359 3.4339914
22   852263.69 .91923871 . -.74360967 3.4339914
23   867873.17 .82630545 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.15890679
 c2   .29564115
 c3  -.03125162
 c4  -.00798918
 c5   .50102697
 c6   .04343163
 c7    .0814803
 c8  -.02102095
 c9    .0074347
c10  -.00434704
c11   .00536138
c12  -.00596482
c13  -.03054844
c14  -.01313388
c15   .00661081
c16    .0049586
c17   .00068469
c18  -.00263724
c19  -.01650766
c20  -.01002924
c21   .00060124
c22  -.02490685
c23  -.06381608
5 2.9925594  6.9476815
   
1   271370.34 6.8237558 2.4999418 3.9223666 3.4339914
2   134675.45 8.6507151 2.6428337 3.9443235 3.4339914
3   155714.33 8.3646801 7.1053872 -.22354409 3.4339914
4   501069.58 4.0243862 5.8057308 1.138658 3.4339914
5   490420.15 4.1437294 2.93085 -1.9460882 3.4339914
6   223632.04 7.4523108 .0602616 .5137589 3.4339914
7   582762.72 3.150985 . -1.5989237 3.4339914
8   495852.25 4.0827049 . -1.365984 3.4339914
9   391415.63 5.3064446 . -1.4901712 3.4339914
10   376350.65 5.4910329 . -1.4914914 3.4339914
11   478717.24 4.2762417 . -2.1130176 3.4339914
12   425426.58 4.8967748 . -.50683379 3.4339914
13   407928.26 5.1062917 . -1.1285694 3.4339914
14   451267.51 4.5924669 . -.51043391 3.4339914
15   474116.31 4.328722 . 2.4460087 3.4339914
16   409487.25 5.0875155 . 2.160603 3.4339914
17   433631.39 4.7994812 . -.58919692 3.4339914
18   414346.73 5.0291254 . -1.3356586 3.4339914
19   321928.84 6.1724595 . .63233185 3.4339914
20   393389.59 5.2823965 . 2.8435903 3.4339914
21   421747.14 4.9406045 . -2.0015359 3.4339914
22   249072.68 7.1158457 . -.74360967 3.4339914
23   281708.49 6.6892896 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .02702182
 c2   .45013288
 c3   .39093227
 c4  -.00256376
 c5  -.03689181
 c6   .09117623
 c7  -.01044429
 c8   -.0083432
 c9   .00075563
c10  -.01167018
c11   .00033987
c12   .00054824
c13  -.00121762
c14  -.00246991
c15   .00231224
c16   .00070078
c17   .00082196
c18   -.0001986
c19   -.0299377
c20  -.00828903
c21   .00030006
c22   .10387235
c23   .04905568
6 5.2490983  1.922367
   
1   337529.54 5.9748961 2.4999418 3.9223666 3.4339914
2   168444.01 8.1923124 2.6428337 3.9443235 3.4339914
3   124114.48 8.7947874 7.1053872 -.22354409 3.4339914
4   525607.86 3.7540404 5.8057308 1.138658 3.4339914
5   543096.28 3.5654547 2.93085 -1.9460882 3.4339914
6   286768.12 6.623712 .0602616 .5137589 3.4339914
7   583669.85 3.1417296 . -1.5989237 3.4339914
8   498019.49 4.0584447 . -1.365984 3.4339914
9   411336.4 5.0652723 . -1.4901712 3.4339914
10   397117.2 5.2370734 . -1.4914914 3.4339914
11   498226.2 4.0561334 . -2.1130176 3.4339914
12   446211.16 4.6515187 . -.50683379 3.4339914
13   430966.06 4.8310195 . -1.1285694 3.4339914
14   460486.64 4.4854328 . -.51043391 3.4339914
15   484532.81 4.2102155 . 2.4460087 3.4339914
16   422859.78 4.9273378 . 2.160603 3.4339914
17   447758.03 4.6334274 . -.58919692 3.4339914
18   427311.22 4.8743722 . -1.3356586 3.4339914
19   330196.44 6.067548 . .63233185 3.4339914
20   403799.4 5.1561203 . 2.8435903 3.4339914
21   435316.12 4.77958 . -2.0015359 3.4339914
22   272862.03 6.804315 . -.74360967 3.4339914
23   313599.55 6.2786268 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00823951
 c2    .4169214
 c3   .57304978
 c4  -.01161904
 c5  -.02682293
 c6   .01891207
 c7  -.01167456
 c8  -.00340902
 c9   .00143719
c10  -.00689789
c11   .00049845
c12   .00079579
c13  -.00459989
c14  -.00120291
c15   .00059529
c16    .0008507
c17   .00098588
c18  -.00024025
c19  -.02350689
c20  -.00423908
c21   .00030686
c22   .03938619
c23    .0109483
7 4.9426686  2.0285431
   
1   415081.56 5.0203139 2.4999418 3.9223666 3.4339914
2   284559.51 6.6523187 2.6428337 3.9443235 3.4339914
3   13290.302 10.319621 7.1053872 -.22354409 3.4339914
4   448637.89 4.6231472 5.8057308 1.138658 3.4339914
5   647762.02 2.514587 2.93085 -1.9460882 3.4339914
6   375279.89 5.5042226 .0602616 .5137589 3.4339914
7   476727.02 4.2989168 . -1.5989237 3.4339914
8   393516.2 5.2808551 . -1.365984 3.4339914
9   331769.98 6.0476346 . -1.4901712 3.4339914
10   319577.21 6.2023863 . -1.4914914 3.4339914
11   414651.28 5.0254728 . -2.1130176 3.4339914
12   366356.3 5.6144984 . -.50683379 3.4339914
13   355218.47 5.753006 . -1.1285694 3.4339914
14   364564.65 5.6367146 . -.51043391 3.4339914
15   389388.02 5.33118 . 2.4460087 3.4339914
16   333488.49 6.0259065 . 2.160603 3.4339914
17   358450.06 5.7127209 . -.58919692 3.4339914
18   337222.08 5.9787732 . -1.3356586 3.4339914
19   238843.77 7.2507357 . .63233185 3.4339914
20   311331.5 6.3076168 . 2.8435903 3.4339914
21   345721.73 5.8718468 . -2.0015359 3.4339914
22   211486.24 7.614052 . -.74360967 3.4339914
23   261550.76 6.9520485 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00531897
 c2   .03011194
 c3   .97312039
 c4  -.00555847
 c5  -.00394649
 c6  -.00306141
 c7   .00044574
 c8   .00624479
 c9  -.00005003
c10  -.00201318
c11  -.00079561
c12   .00014543
c13  -.00159964
c14   .00166323
c15  -.00258401
c16  -.00089336
c17  -.00024664
c18   .00029975
c19   .00764251
c20   .00283937
c21  -.00004509
c22  -.00680189
c23  -.00596884
8 3.3234118  .35982058
   
1   428470.25 4.8606109 2.4999418 3.9223666 3.4339914
2   380410.1 5.4411113 2.6428337 3.9443235 3.4339914
3   146045.14 8.4959679 7.1053872 -.22354409 3.4339914
4   290916.98 6.5700553 5.8057308 1.138658 3.4339914
5   693789.58 2.0987964 2.93085 -1.9460882 3.4339914
6   410243.19 5.0784189 .0602616 .5137589 3.4339914
7   335852.61 5.99605 . -1.5989237 3.4339914
8   249298.15 7.1128787 . -1.365984 3.4339914
9   174162.44 8.1150677 . -1.4901712 3.4339914
10   162646.33 8.2707472 . -1.4914914 3.4339914
11   256602.97 7.0168958 . -2.1130176 3.4339914
12   208503.84 7.6538705 . -.50683379 3.4339914
13   198397.21 7.7890958 . -1.1285694 3.4339914
14   210858.54 7.6224294 . -.51043391 3.4339914
15   235202.45 7.2988837 . 2.4460087 3.4339914
16   176200.7 8.0875639 . 2.160603 3.4339914
17   201258.7 7.7507649 . -.58919692 3.4339914
18   180190.21 8.0337756 . -1.3356586 3.4339914
19   81609.151 9.3773654 . .63233185 3.4339914
20   155184.16 8.371871 . 2.8435903 3.4339914
21   188563.68 7.9210808 . -2.0015359 3.4339914
22   82491.063 9.3652404 . -.74360967 3.4339914
23   131475.7 8.6943333 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00535487
 c2  -.00713016
 c3   .27067375
 c4   -.0171211
 c5  -.00456178
 c6   .00154075
 c7   .00529815
 c8   .03333858
 c9  -.00512455
c10  -.03524804
c11   -.0046333
c12  -.00058224
c13  -.01136325
c14   .01239149
c15  -.01325208
c16  -.01305997
c17  -.00304133
c18   .00360583
c19   .44070932
c20   .00720494
c21  -.00051631
c22   .40541843
c23  -.06021382
10 3.3058929  1.2126572
   
1   185704.28 7.9595332 2.4999418 3.9223666 3.4339914
2   267443.24 6.8749976 2.6428337 3.9443235 3.4339914
3   531540.31 3.6896791 7.1053872 -.22354409 3.4339914
4   745326.61 1.6704313 5.8057308 1.138658 3.4339914
5   114012.8 8.93287 2.93085 -1.9460882 3.4339914
6   177837.54 8.065488 .0602616 .5137589 3.4339914
7   891810.14 .69255761 . -1.5989237 3.4339914
8   807839.6 1.2076223 . -1.365984 3.4339914
9   667713.26 2.3306519 . -1.4901712 3.4339914
10   652681.85 2.468714 . -1.4914914 3.4339914
11   743502.55 1.684891 . -2.1130176 3.4339914
12   693633.2 2.1001573 . -.50683379 3.4339914
13   671710.8 2.2944719 . -1.1285694 3.4339914
14   749604.91 1.6367237 . -.51043391 3.4339914
15   766814.48 1.5040984 . 2.4460087 3.4339914
16   701747.96 2.0300161 . 2.160603 3.4339914
17   720658.78 1.8703909 . -.58919692 3.4339914
18   707070.08 1.9845465 . -1.3356586 3.4339914
19   638763.38 2.5993522 . .63233185 3.4339914
20   695459.72 2.0842844 . 2.8435903 3.4339914
21   711860.09 1.9439871 . -2.0015359 3.4339914
22   545127.42 3.5437788 . -.74360967 3.4339914
23   545529.17 3.539497 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .13022152
 c2   .12840755
 c3  -.01839343
 c4   -.0075342
 c5   .58068724
 c6   .20763774
 c7  -.00686715
 c8  -.00112848
 c9   .00118653
c10   .00110809
c11   .00160793
c12   .00042189
c13   -.0039614
c14   .00006734
c15   .00162126
c16   .00076669
c17   .00069147
c18  -.00015909
c19   .00259979
c20   .00066577
c21   .00018113
c22  -.01232243
c23  -.01983794
13 3.4621208  1.9089461
   
1   231613.18 7.3464084 2.4999418 3.9223666 3.4339914
2   275205.08 6.7738049 2.6428337 3.9443235 3.4339914
3   242410.7 7.2036366 7.1053872 -.22354409 3.4339914
4   350636.93 5.8102548 5.8057308 1.138658 3.4339914
5   505589.97 3.9740921 2.93085 -1.9460882 3.4339914
6   229855.34 7.3697067 .0602616 .5137589 3.4339914
7   485511.61 4.199137 . -1.5989237 3.4339914
8   402151.65 5.176047 . -1.365984 3.4339914
9   262143.43 6.9442898 . -1.4901712 3.4339914
10   246904.33 7.1443945 . -1.4914914 3.4339914
11   341672.55 5.9227205 . -2.1130176 3.4339914
12   289925.47 6.5828688 . -.50683379 3.4339914
13   268524.61 6.8608788 . -1.1285694 3.4339914
14   343248.05 5.9029117 . -.51043391 3.4339914
15   360583.9 5.686164 . 2.4460087 3.4339914
16   295376.65 6.5124977 . 2.160603 3.4339914
17   314549.07 6.2665004 . -.58919692 3.4339914
18   300698.87 6.4439714 . -1.3356586 3.4339914
19   238478.73 7.2555595 . .63233185 3.4339914
20   289664.65 6.5862405 . 2.8435903 3.4339914
21   305544.52 6.3817389 . -2.0015359 3.4339914
22   143891.87 8.5252451 . -.74360967 3.4339914
23   139313.65 8.5875403 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .21548747
 c2   .06725168
 c3   .10206793
 c4   .04655792
 c5  -.03572189
 c6   .11542087
 c7  -.01778389
 c8  -.01396981
 c9  -.00972407
c10  -.02251701
c11  -.00873467
c12  -.00183092
c13   .03939105
c14  -.00344866
c15  -.00121263
c16   -.0049549
c17  -.00343764
c18    .0012123
c19  -.07288277
c20  -.01840192
c21  -.00097471
c22   .25477626
c23   .38477307
15 4.2624289  2.1723513
   
1   691410.06 2.1195434 2.4999418 3.9223666 3.4339914
2   681591.99 2.2060243 2.6428337 3.9443235 3.4339914
3   431089.93 4.8295523 7.1053872 -.22354409 3.4339914
4   207929.02 7.6615497 5.8057308 1.138658 3.4339914
5   966273.27 .34729538 2.93085 -1.9460882 3.4339914
6   688713.3 2.143157 .0602616 .5137589 3.4339914
7   38983.938 9.964734 . -1.5989237 3.4339914
8   58757.803 9.6919661 . -1.365984 3.4339914
9   209317.5 7.6430033 . -1.4901712 3.4339914
10   222116.12 7.4724602 . -1.4914914 3.4339914
11   171131.06 8.1560009 . -2.1130176 3.4339914
12   196657.85 7.8124123 . -.50683379 3.4339914
13   217204.99 7.5378125 . -1.1285694 3.4339914
14   121494.03 8.8305821 . -.51043391 3.4339914
15   112971.17 8.9471229 . 2.4460087 3.4339914
16   168807.63 8.1873971 . 2.160603 3.4339914
17   156173.79 8.3584492 . -.58919692 3.4339914
18   163688.07 8.2566452 . -1.3356586 3.4339914
19   231564.91 7.3470479 . .63233185 3.4339914
20   171180.84 8.1553283 . 2.8435903 3.4339914
21   161140.27 8.2911414 . -2.0015359 3.4339914
22   322026.6 6.1712161 . -.74360967 3.4339914
23   323582.25 6.1514406 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00363344
 c2  -.00300511
 c3   .01567301
 c4  -.02136651
 c5  -.00059556
 c6  -.00111235
 c7   .61975996
 c8   .40680875
 c9  -.00138797
c10   -.0056735
c11   -.0086293
c12  -.00008757
c13  -.00257607
c14  -.00450188
c15  -.01969399
c16  -.00453486
c17  -.00397673
c18   .00090071
c19   .02129231
c20   .01391884
c21  -.00086879
c22  -.00206731
c23  -.00752912
18 1.8716923  .70839873
   
1   434560.01 4.7885085 2.4999418 3.9223666 3.4339914
2   462099.85 4.4667884 2.6428337 3.9443235 3.4339914
3   287572.55 6.6133002 7.1053872 -.22354409 3.4339914
4   156840.51 8.3494086 5.8057308 1.138658 3.4339914
5   709938.43 1.9602171 2.93085 -1.9460882 3.4339914
6   438099.78 4.746755 .0602616 .5137589 3.4339914
7   280440.19 6.7057523 . -1.5989237 3.4339914
8   201499.31 7.7475433 . -1.365984 3.4339914
9   53854.43 9.7595658 . -1.4901712 3.4339914
10   38857.463 9.9664799 . -1.4914914 3.4339914
11   136716.51 8.6229071 . -2.1130176 3.4339914
12   83358.513 9.3533156 . -.50683379 3.4339914
13   63878.386 9.6214039 . -1.1285694 3.4339914
14   138735.8 8.5954074 . -.51043391 3.4339914
15   153461.77 8.3952384 . 2.4460087 3.4339914
16   91002.538 9.2482925 . 2.160603 3.4339914
17   107121.15 9.0272171 . -.58919692 3.4339914
18   96143.798 9.1777185 . -1.3356586 3.4339914
19   92146.276 9.2325879 . .63233185 3.4339914
20   93850.156 9.2091968 . 2.8435903 3.4339914
21   99449.244 9.1323731 . -2.0015359 3.4339914
22   96718.584 9.1698317 . -.74360967 3.4339914
23   69605.209 9.54253 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .00445287
 c2  -.00339259
 c3   -.0161732
 c4   .02636069
 c5  -.00007976
 c6  -.00216866
 c7  -.00534639
 c8   -.0090559
 c9  -.05860032
c10   .57066415
c11  -.00849813
c12  -.03644859
c13   .16242522
c14  -.00693402
c15  -.00352611
c16  -.01149838
c17  -.01308139
c18    -.003795
c19   .08222921
c20   .00680185
c21  -.00965385
c22   .02890975
c23   .30576619
19 2.4627983  .66819427
   
1   515783.18 3.8614915 2.4999418 3.9223666 3.4339914
2   528692.12 3.7205298 2.6428337 3.9443235 3.4339914
3   319118.51 6.2082282 7.1053872 -.22354409 3.4339914
4   124093.72 8.7950709 5.8057308 1.138658 3.4339914
5   791094.23 1.3252265 2.93085 -1.9460882 3.4339914
6   516929.02 3.8489047 .0602616 .5137589 3.4339914
7   198819.96 7.7834307 . -1.5989237 3.4339914
8   119535.19 8.8573509 . -1.365984 3.4339914
9   34342.792 10.028809 . -1.4901712 3.4339914
10   44799.704 9.8844682 . -1.4914914 3.4339914
11   84400.115 9.3389984 . -2.1130176 3.4339914
12   46923.721 9.8551616 . -.50683379 3.4339914
13   54262.287 9.7539419 . -1.1285694 3.4339914
14   56638.894 9.7211746 . -.51043391 3.4339914
15   73697.451 9.4861982 . 2.4460087 3.4339914
16   9025.7257 10.378553 . 2.160603 3.4339914
17   29730.238 10.092504 . -.58919692 3.4339914
18   13977.979 10.310119 . -1.3356586 3.4339914
19   92174.893 9.232195 . .63233185 3.4339914
20   28233.443 10.113177 . 2.8435903 3.4339914
21   18526.253 10.247274 . -2.0015359 3.4339914
22   157872.41 8.3354194 . -.74360967 3.4339914
23   148173.47 8.4670439 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00043599
 c2    .0001864
 c3  -.00114983
 c4  -.00456668
 c5   .00009834
 c6   .00003787
 c7  -.00008537
 c8  -.00478392
 c9   .15222076
c10   .02971469
c11  -.00211085
c12   .04359312
c13  -.02068019
c14  -.03103134
c15   -.0014533
c16    .7151782
c17   .02106411
c18  -.07090715
c19   .00622037
c20   .08668831
c21    .0858018
c22   .00015267
c23  -.00328917
21 4.8893425  .19046786
   
1   497233.66 4.0672356 2.4999418 3.9223666 3.4339914
2   511802.52 3.90533 2.6428337 3.9443235 3.4339914
3   307851.89 6.3521587 7.1053872 -.22354409 3.4339914
4   130442.77 8.7084202 5.8057308 1.138658 3.4339914
5   772542 1.4610253 2.93085 -1.9460882 3.4339914
6   498478.92 4.0533083 .0602616 .5137589 3.4339914
7   217369.48 7.5356218 . -1.5989237 3.4339914
8   137572.12 8.6112535 . -1.365984 3.4339914
9   22217.184 10.196281 . -1.4901712 3.4339914
10   27948.641 10.11711 . -1.4914914 3.4339914
11   94908.046 9.1946768 . -2.1130176 3.4339914
12   48641.284 9.8314664 . -.50683379 3.4339914
13   47802.558 9.8430369 . -1.1285694 3.4339914
14   75136.907 9.4663895 . -.51043391 3.4339914
15   91973.522 9.2349598 . 2.4460087 3.4339914
16   27133.09 10.128375 . 2.160603 3.4339914
17   46818.605 9.8566118 . -.58919692 3.4339914
18   32355.77 10.056246 . -1.3356586 3.4339914
19   82748.759 9.3616977 . .63233185 3.4339914
20   35513.702 10.012642 . 2.8435903 3.4339914
21   36790.394 9.9950156 . -2.0015359 3.4339914
22   140775.17 8.5676467 . -.74360967 3.4339914
23   129638.37 8.7193924 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00111885
 c2   .00028813
 c3  -.00312519
 c4   -.0070926
 c5   .00021761
 c6  -.00002449
 c7  -.00042215
 c8  -.00750928
 c9   .36972746
c10   .19935066
c11  -.00415996
c12    .0299124
c13  -.05877279
c14  -.03123407
c15  -.00102256
c16   .33997803
c17   .00451215
c18  -.06861288
c19   .04172208
c20   .17612389
c21   .02356531
c22   .00181011
c23  -.00313768
22 3.9629541  .32139265
   
1   471529.79 4.3583188 2.4999418 3.9223666 3.4339914
2   507040.15 3.9580039 2.6428337 3.9443235 3.4339914
3   328209.36 6.0927196 7.1053872 -.22354409 3.4339914
4   111775.75 8.9634831 5.8057308 1.138658 3.4339914
5   746626.45 1.6601594 2.93085 -1.9460882 3.4339914
6   478348.43 4.2804406 .0602616 .5137589 3.4339914
7   247994.1 7.1300434 . -1.5989237 3.4339914
8   175681.69 8.0945659 . -1.365984 3.4339914
9   26803.431 10.132928 . -1.4901712 3.4339914
10   26055.846 10.143254 . -1.4914914 3.4339914
11   92675.716 9.225319 . -2.1130176 3.4339914
12   40747.531 9.9403908 . -.50683379 3.4339914
13   19209.865 10.237829 . -1.1285694 3.4339914
14   111348.57 8.9693303 . -.51043391 3.4339914
15   120409.69 8.8453991 . 2.4460087 3.4339914
16   69281.408 9.5469883 . 2.160603 3.4339914
17   75781.213 9.4575242 . -.58919692 3.4339914
18   73174.683 9.4933929 . -1.3356586 3.4339914
19   115842.08 8.9078461 . .63233185 3.4339914
20   83996.642 9.3445441 . 2.8435903 3.4339914
21   72664.259 9.5004182 . -2.0015359 3.4339914
22   141598.41 8.556444 . -.74360967 3.4339914
23   113013.39 8.946545 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .00543282
 c2  -.00172721
 c3  -.00425748
 c4   .03310236
 c5  -.00053946
 c6  -.00055877
 c7  -.00363886
 c8  -.00250761
 c9   .08800365
c10   .34687528
c11  -.00651819
c12  -.04337925
c13   .59547812
c14   .00138417
c15  -.00476081
c16  -.03134257
c17  -.01278748
c18   .00602892
c19  -.00706579
c20  -.01808194
c21  -.00822966
c22  -.00650316
c23   .07400532
24 2.0560008  .34623145
   
1   527705.63 3.7312364 2.4999418 3.9223666 3.4339914
2   565380.77 3.3302847 2.6428337 3.9443235 3.4339914
3   375365.09 5.5031728 7.1053872 -.22354409 3.4339914
4   61685.319 9.6516204 5.8057308 1.138658 3.4339914
5   802314.22 1.2458998 2.93085 -1.9460882 3.4339914
6   536286.82 3.6384705 .0602616 .5137589 3.4339914
7   200889.23 7.755712 . -1.5989237 3.4339914
8   141172.81 8.5622353 . -1.365984 3.4339914
9   56519.77 9.7228168 . -1.4901712 3.4339914
10   70615.481 9.5286207 . -1.4914914 3.4339914
11   33850.536 10.035606 . -2.1130176 3.4339914
12   21528.784 10.205792 . -.50683379 3.4339914
13   39692.813 9.954949 . -1.1285694 3.4339914
14   82568.799 9.3641717 . -.51043391 3.4339914
15   79562.332 9.4055113 . 2.4460087 3.4339914
16   66220.049 9.5891472 . 2.160603 3.4339914
17   51139.912 9.7970012 . -.58919692 3.4339914
18   65883.397 9.5937841 . -1.3356586 3.4339914
19   151498.35 8.4218876 . .63233185 3.4339914
20   91086.418 9.2471406 . 2.8435903 3.4339914
21   58878.039 9.6903088 . -2.0015359 3.4339914
22   197446.41 7.80184 . -.74360967 3.4339914
23   171856.06 8.146208 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .00131265
 c2  -.00029177
 c3  -.00031974
 c4   .08304861
 c5  -.00010313
 c6  -.00007224
 c7  -.00940937
 c8  -.00532115
 c9  -.04174321
c10  -.00561745
c11   .31128471
c12   .54174639
c13   .08862844
c14  -.00376961
c15    -.004325
c16  -.00730756
c17   .07344673
c18  -.00650375
c19  -.00321125
c20  -.00771199
c21   -.0063027
c22  -.00178347
c23   .00546086
27 2.521246  .36046213
   
1   543011.55 3.56636 2.4999418 3.9223666 3.4339914
2   566833.27 3.3151611 2.6428337 3.9443235 3.4339914
3   361398.08 5.6760402 7.1053872 -.22354409 3.4339914
4   86924.34 9.3043103 5.8057308 1.138658 3.4339914
5   818286.18 1.1366889 2.93085 -1.9460882 3.4339914
6   547821.7 3.5150999 .0602616 .5137589 3.4339914
7   175812.6 8.0927997 . -1.5989237 3.4339914
8   108739.02 9.0050584 . -1.365984 3.4339914
9   56012.625 9.7298086 . -1.4901712 3.4339914
10   71457.849 9.5170243 . -1.4914914 3.4339914
11   43379.95 9.90406 . -2.1130176 3.4339914
12   34666.173 10.024344 . -.50683379 3.4339914
13   55785.481 9.7329402 . -1.1285694 3.4339914
14   47895.921 9.8417489 . -.51043391 3.4339914
15   49081.429 9.8253947 . 2.4460087 3.4339914
16   40505.123 9.9437366 . 2.160603 3.4339914
17   18218.979 10.25152 . -.58919692 3.4339914
18   37935.585 9.9792059 . -1.3356586 3.4339914
19   134393.96 8.6545511 . .63233185 3.4339914
20   65141.884 9.6039981 . 2.8435903 3.4339914
21   29455.873 10.096294 . -2.0015359 3.4339914
22   195909.71 7.8224452 . -.74360967 3.4339914
23   179148.17 8.0478191 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   -.0005965
 c2   .00027434
 c3  -.00018291
 c4  -.01890713
 c5   .00009286
 c6   .00010089
 c7  -.00261889
 c8  -.01414297
 c9    .0187232
c10  -.01238961
c11   .19635313
c12   .23981164
c13  -.02829233
c14  -.00029408
c15   .09277867
c16   .02174043
c17   .56446653
c18  -.03532272
c19  -.00389346
c20  -.02234331
c21   .00955042
c22   .00009784
c23   -.0038013
29 2.8262768  .31467513
   
1   504381.51 3.9875161 2.4999418 3.9223666 3.4339914
2   541820.42 3.5790948 2.6428337 3.9443235 3.4339914
3   356570.51 5.7361418 7.1053872 -.22354409 3.4339914
4   79922.805 9.4005539 5.8057308 1.138658 3.4339914
5   779169.6 1.4118562 2.93085 -1.9460882 3.4339914
6   512458.46 3.8980943 .0602616 .5137589 3.4339914
7   220195.84 7.4979999 . -1.5989237 3.4339914
8   154552.9 8.380434 . -1.365984 3.4339914
9   37713.672 9.9822694 . -1.4901712 3.4339914
10   49682.449 9.8171041 . -1.4914914 3.4339914
11   57834.086 9.7046985 . -2.1130176 3.4339914
12   11915.616 10.338617 . -.50683379 3.4339914
13   15896.89 10.283604 . -1.1285694 3.4339914
14   92048.142 9.2339352 . -.51043391 3.4339914
15   94898.28 9.1948109 . 2.4460087 3.4339914
16   62334.095 9.6426807 . 2.160603 3.4339914
17   56498.856 9.7231052 . -.58919692 3.4339914
18   63945.357 9.6204812 . -1.3356586 3.4339914
19   136099.74 8.6313088 . .63233185 3.4339914
20   84738.435 9.3343485 . 2.8435903 3.4339914
21   59377.547 9.6834241 . -2.0015359 3.4339914
22   174909.17 8.1049897 . -.74360967 3.4339914
23   147967.32 8.4698449 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .00179933
 c2  -.00050269
 c3  -.00074804
 c4   .04687314
 c5  -.00020939
 c6  -.00013944
 c7  -.00369364
 c8  -.00128403
 c9  -.03477184
c10  -.00542701
c11    .0400443
c12   .56416324
c13   .42698006
c14   .00076717
c15  -.00790148
c16  -.01079432
c17  -.01166823
c18   .00221429
c19  -.00266903
c20  -.00226924
c21  -.00749865
c22  -.00198326
c23   .00840948
30 2.672623  .2125456
   
1   503454.83 3.9978205 2.4999418 3.9223666 3.4339914
2   529121.66 3.7158713 2.6428337 3.9443235 3.4339914
3   333474.93 6.026078 7.1053872 -.22354409 3.4339914
4   103392.53 9.0783078 5.8057308 1.138658 3.4339914
5   778773.71 1.4147728 2.93085 -1.9460882 3.4339914
6   508059.4 3.9467098 .0602616 .5137589 3.4339914
7   213585.53 7.586048 . -1.5989237 3.4339914
8   140360.48 8.5732906 . -1.365984 3.4339914
9   16708.729 10.272386 . -1.4901712 3.4339914
10   32254.247 10.057648 . -1.4914914 3.4339914
11   71226.272 9.5202122 . -2.1130176 3.4339914
12   21048.431 10.212428 . -.50683379 3.4339914
13   24696.724 10.162028 . -1.1285694 3.4339914
14   76039.695 9.4539677 . -.51043391 3.4339914
15   85815.058 9.3195527 . 2.4460087 3.4339914
16   36925.738 9.9931471 . 2.160603 3.4339914
17   40506.867 9.9437126 . -.58919692 3.4339914
18   39809.406 9.9533396 . -1.3356586 3.4339914
19   109982.84 8.9880269 . .63233185 3.4339914
20   57323.189 9.7117412 . 2.8435903 3.4339914
21   37869.599 9.9801168 . -2.0015359 3.4339914
22   158961.34 8.3206609 . -.74360967 3.4339914
23   139531.71 8.5845718 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00097832
 c2   .00032658
 c3   .00019044
 c4  -.01535704
 c5    .0001165
 c6   .00010286
 c7   .00031441
 c8  -.00185168
 c9   .46994838
c10  -.04056896
c11   -.0059078
c12    .3120609
c13   .10394394
c14  -.01928658
c15  -.00113798
c16   .12025625
c17   .06475571
c18  -.03313882
c19   -.0027587
c20  -.00504398
c21   .06400133
c22   .00006923
c23  -.00949785
31 2.6470248  .24390204
   
1   581353.65 3.165382 2.4999418 3.9223666 3.4339914
2   567470.37 3.3085356 2.6428337 3.9443235 3.4339914
3   324814.6 6.1357869 7.1053872 -.22354409 3.4339914
4   177725.3 8.0670015 5.8057308 1.138658 3.4339914
5   855334.9 .90060227 2.93085 -1.9460882 3.4339914
6   576037.88 3.2199156 .0602616 .5137589 3.4339914
7   146515.07 8.4895804 . -1.5989237 3.4339914
8   59896.923 9.6762659 . -1.365984 3.4339914
9   117853.18 8.8803446 . -1.4901712 3.4339914
10   126087.85 8.7678436 . -1.4914914 3.4339914
11   131384.4 8.6955783 . -2.1130176 3.4339914
12   122703.09 8.8140644 . -.50683379 3.4339914
13   136331.61 8.62815 . -1.1285694 3.4339914
14   51567.04 9.7911102 . -.51043391 3.4339914
15   71247.686 9.5199174 . 2.4460087 3.4339914
16   75254.535 9.464771 . 2.160603 3.4339914
17   79348.098 9.4084576 . -.58919692 3.4339914
18   71929.41 9.510533 . -1.3356586 3.4339914
19   117070.57 8.8910454 . .63233185 3.4339914
20   65092.349 9.6046804 . 2.8435903 3.4339914
21   75072.721 9.4672727 . -2.0015359 3.4339914
22   208758.74 7.6504658 . -.74360967 3.4339914
23   215834.27 7.5560727 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00383003
 c2  -.00357551
 c3   .03219611
 c4  -.02364683
 c5  -.00206149
 c6  -.00149473
 c7   .00326911
 c8   .40091435
 c9  -.02193633
c10  -.02953189
c11  -.03378223
c12  -.01310431
c13  -.00247308
c14   .37302753
c15  -.05734015
c16  -.05553326
c17  -.04258402
c18   .07138846
c19   .12804365
c20   .29830249
c21   .00182365
c22  -.00773238
c23  -.01848691
33 3.3993671  .82321691
   
1   645514.12 2.5356579 2.4999418 3.9223666 3.4339914
2   656271.69 2.4354539 2.6428337 3.9443235 3.4339914
3   425282.03 4.8984943 7.1053872 -.22354409 3.4339914
4   137693.49 8.6096007 5.8057308 1.138658 3.4339914
5   920887.11 .54473698 2.93085 -1.9460882 3.4339914
6   648090.3 2.5115157 .0602616 .5137589 3.4339914
7   73135.339 9.4939344 . -1.5989237 3.4339914
8   52018.877 9.7848787 . -1.365984 3.4339914
9   157510.34 8.3403275 . -1.4901712 3.4339914
10   172147.35 8.142274 . -1.4914914 3.4339914
11   103170.83 9.0813466 . -2.1130176 3.4339914
12   137211.61 8.6161634 . -.50683379 3.4339914
13   159102.21 8.3187519 . -1.1285694 3.4339914
14   77504.092 9.4338214 . -.51043391 3.4339914
15   57729.106 9.7061457 . 2.4460087 3.4339914
16   123623.36 8.8014946 . 2.160603 3.4339914
17   103925.32 9.0710055 . -.58919692 3.4339914
18   118328.87 8.873841 . -1.3356586 3.4339914
19   206581.07 7.6795627 . .63233185 3.4339914
20   135354.27 8.6414652 . 2.8435903 3.4339914
21   112865.11 8.9485742 . -2.0015359 3.4339914
22   287398.54 6.6155521 . -.74360967 3.4339914
23   279027.62 6.7240986 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00013328
 c2   .00068687
 c3  -.01028076
 c4    .0690702
 c5  -.00107578
 c6   .00056123
 c7   .29976831
 c8   .32481562
 c9   .00274786
c10  -4.521e-06
c11   .10161223
c12  -.02197491
c13   -.0128919
c14  -.04904463
c15   .37237164
c16   .00420727
c17  -.01688358
c18  -.01020882
c19  -.01844643
c20  -.02700634
c21  -.00659684
c22   .00023136
c23  -.00109716
34 3.2971113  .77849707
   
1   611675.27 2.8610936 2.4999418 3.9223666 3.4339914
2   616619.71 2.8125929 2.6428337 3.9443235 3.4339914
3   384800.8 5.3872664 7.1053872 -.22354409 3.4339914
4   136440.51 8.6266666 5.8057308 1.138658 3.4339914
5   886977.07 .71869619 2.93085 -1.9460882 3.4339914
6   612145.57 2.8564666 .0602616 .5137589 3.4339914
7   102928.68 9.0846657 . -1.5989237 3.4339914
8   33950.718 10.034222 . -1.365984 3.4339914
9   125688.5 8.7732953 . -1.4901712 3.4339914
10   139241.76 8.588519 . -1.4914914 3.4339914
11   93421.122 9.2150861 . -2.1130176 3.4339914
12   112070.51 8.9594488 . -.50683379 3.4339914
13   132509.81 8.6802334 . -1.1285694 3.4339914
14   39527.938 9.9572248 . -.51043391 3.4339914
15   28837.425 10.104835 . 2.4460087 3.4339914
16   87497.776 9.2964318 . 2.160603 3.4339914
17   71910.715 9.5107904 . -.58919692 3.4339914
18   82191.393 9.3693602 . -1.3356586 3.4339914
19   166185.35 8.222855 . .63233185 3.4339914
20   96093.714 9.1784058 . 2.8435903 3.4339914
21   78230.439 9.42383 . -2.0015359 3.4339914
22   248983 7.117026 . -.74360967 3.4339914
23   243935.87 7.1835177 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .00017739
 c2    .0004129
 c3  -.00320882
 c4   .01148243
 c5  -.00030115
 c6   .00025877
 c7   .04013312
 c8   .40829863
 c9    .0002283
c10  -.00084857
c11   .01465871
c12  -.00909856
c13  -.00290732
c14    .1401015
c15   .45834547
c16   .00048742
c17  -.03826349
c18  -.00466451
c19  -.00498527
c20  -.00104585
c21  -.00617956
c22  -.00019357
c23  -.00041242
35 3.8928197  .42445808
   
1   530412.16 3.7018879 2.4999418 3.9223666 3.4339914
2   548039.82 3.5127818 2.6428337 3.9443235 3.4339914
3   339569.3 5.9491926 7.1053872 -.22354409 3.4339914
4   106668.51 9.0334177 5.8057308 1.138658 3.4339914
5   805790.66 1.2217554 2.93085 -1.9460882 3.4339914
6   533202.02 3.6717224 .0602616 .5137589 3.4339914
7   184998.69 7.9690268 . -1.5989237 3.4339914
8   110338.09 8.9831632 . -1.365984 3.4339914
9   42863.834 9.9111826 . -1.4901712 3.4339914
10   57023.227 9.7158763 . -1.4914914 3.4339914
11   64874.983 9.6076747 . -2.1130176 3.4339914
12   37731.318 9.9820258 . -.50683379 3.4339914
13   52993.995 9.771431 . -1.1285694 3.4339914
14   46012.242 9.8677374 . -.51043391 3.4339914
15   57613.545 9.7077386 . 2.4460087 3.4339914
16   18885.169 10.242315 . 2.160603 3.4339914
17   11267.473 10.347574 . -.58919692 3.4339914
18   17350.684 10.263517 . -1.3356586 3.4339914
19   112510.97 8.9534206 . .63233185 3.4339914
20   43979.93 9.8957804 . 2.8435903 3.4339914
21   10347.489 10.360287 . -2.0015359 3.4339914
22   177020.18 8.0765104 . -.74360967 3.4339914
23   164044.64 8.2518192 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00032699
 c2   .00013641
 c3  -.00012509
 c4  -.00662166
 c5   .00005417
 c6    .0000443
 c7  -.00029895
 c8  -.00236566
 c9   .07079507
c10   -.0093113
c11   .01324278
c12   .11139962
c13  -.01193821
c14  -.03923446
c15  -.00182066
c16   .14705652
c17   .40422437
c18  -.05137102
c19  -.00182439
c20  -.02404699
c21   .40560664
c22   .00003839
c23  -.00297235
38 2.5507891  .17366523
   
1   532297.76 3.6814901 2.4999418 3.9223666 3.4339914
2   541336.57 3.5842725 2.6428337 3.9443235 3.4339914
3   325098.48 6.1321824 7.1053872 -.22354409 3.4339914
4   126540.82 8.7616605 5.8057308 1.138658 3.4339914
5   807544.63 1.2096524 2.93085 -1.9460882 3.4339914
6   532646.69 3.6777199 .0602616 .5137589 3.4339914
7   182416.42 8.0037873 . -1.5989237 3.4339914
8   102195.93 9.0947105 . -1.365984 3.4339914
9   51332.33 9.7943473 . -1.4901712 3.4339914
10   62233.912 9.6440612 . -1.4914914 3.4339914
11   83371.033 9.3531435 . -2.1130176 3.4339914
12   56788.588 9.7191109 . -.50683379 3.4339914
13   68545.799 9.5571174 . -1.1285694 3.4339914
14   40056.77 9.9499252 . -.51043391 3.4339914
15   59477.319 9.682049 . 2.4460087 3.4339914
16   8420.1756 10.386921 . 2.160603 3.4339914
17   22605.193 10.190921 . -.58919692 3.4339914
18   4102.5681 10.446589 . -1.3356586 3.4339914
19   98283.881 9.1483574 . .63233185 3.4339914
20   25665.335 10.148649 . 2.8435903 3.4339914
21   10700.073 10.355415 . -2.0015359 3.4339914
22   171295.56 8.1537788 . -.74360967 3.4339914
23   164417.87 8.2467681 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .00001277
 c2  -.00004221
 c3   .00030339
 c4   .00003489
 c5  -.00002993
 c6  -9.364e-06
 c7  -.00083143
 c8   .00308133
 c9  -.01531173
c10  -.00353904
c11  -.00353456
c12   -.0128342
c13   .00153413
c14   .05948368
c15   -.0064725
c16   .04217996
c17   .01094369
c18   .74599195
c19  -.00177946
c20   .09395536
c21   .08737072
c22  -.00034956
c23  -.00017803
39 2.6049883  .09756867
   
1   548427.21 3.5086662 2.4999418 3.9223666 3.4339914
2   557943.25 3.4081212 2.6428337 3.9443235 3.4339914
3   339154.31 5.9544196 7.1053872 -.22354409 3.4339914
4   121085.56 8.8361633 5.8057308 1.138658 3.4339914
5   823725.67 1.1005047 2.93085 -1.9460882 3.4339914
6   549205.57 3.5004023 .0602616 .5137589 3.4339914
7   166179.59 8.2229329 . -1.5989237 3.4339914
8   87750.5 9.2929597 . -1.365984 3.4339914
9   64266.125 9.6160622 . -1.4901712 3.4339914
10   76727.903 9.4444993 . -1.4914914 3.4339914
11   75822.536 9.4569556 . -2.1130176 3.4339914
12   61270.537 9.657336 . -.50683379 3.4339914
13   77106.959 9.4392846 . -1.1285694 3.4339914
14   24018.251 10.171401 . -.51043391 3.4339914
15   42803.275 9.9120183 . 2.4460087 3.4339914
16   24296.36 10.167559 . 2.160603 3.4339914
17   17571.361 10.260468 . -.58919692 3.4339914
18   18974.607 10.241079 . -1.3356586 3.4339914
19   113118.58 8.9451056 . .63233185 3.4339914
20   39394.308 9.9590694 . 2.8435903 3.4339914
21   15994.459 10.282256 . -2.0015359 3.4339914
22   188048.25 7.9280099 . -.74360967 3.4339914
23   180712.36 8.0267403 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00001896
 c2  -.00007384
 c3   .00059243
 c4  -.00167085
 c5  -.00005056
 c6  -.00001763
 c7  -.00289797
 c8  -.00054756
 c9  -.02497734
c10   -.0058552
c11  -.00525786
c12  -.02658562
c13   .00200064
c14   .32191601
c15    .0022332
c16  -.07962988
c17   .26294036
c18   .24429551
c19  -.00111198
c20   .07738985
c21   .23854048
c22  -.00067826
c23  -.00047978
41 2.4359057  .23608319
   
1   522544.42 3.78743 2.4999418 3.9223666 3.4339914
2   529559.51 3.7111249 2.6428337 3.9443235 3.4339914
3   313524.95 6.2795799 7.1053872 -.22354409 3.4339914
4   134801.34 8.6489995 5.8057308 1.138658 3.4339914
5   797685.5 1.2783668 2.93085 -1.9460882 3.4339914
6   522125.76 3.7920012 .0602616 .5137589 3.4339914
7   192597.02 7.8668976 . -1.5989237 3.4339914
8   110711.67 8.9780487 . -1.365984 3.4339914
9   47357.818 9.8491726 . -1.4901712 3.4339914
10   55828.703 9.7323443 . -1.4914914 3.4339914
11   92998.231 9.2208914 . -2.1130176 3.4339914
12   60339.169 9.670171 . -.50683379 3.4339914
13   68376.418 9.5594498 . -1.1285694 3.4339914
14   50619.807 9.8041748 . -.51043391 3.4339914
15   71186.543 9.5207591 . 2.4460087 3.4339914
16   9447.5252 10.372724 . 2.160603 3.4339914
17   33430.504 10.041406 . -.58919692 3.4339914
18   12144.319 10.335457 . -1.3356586 3.4339914
19   86545.205 9.3095197 . .63233185 3.4339914
20   15749.018 10.285647 . 2.8435903 3.4339914
21   20733.27 10.216782 . -2.0015359 3.4339914
22   159793.29 8.3093879 . -.74360967 3.4339914
23   154551.73 8.3804499 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00008469
 c2    .0000561
 c3   -.0006443
 c4  -.00065658
 c5   .00002904
 c6     .000013
 c7   -.0006211
 c8  -.00083579
 c9   .01870269
c10    .0125948
c11  -.00269689
c12  -.00577492
c13  -.00584111
c14   .01714128
c15  -.00417192
c16   .49655881
c17  -.01035496
c18   .17156562
c19    -.000925
c20    .3565408
c21  -.03965137
c22  -.00015282
c23  -.00058248
42 5.3278572  .15957889
   
1   544890.94 3.5463 2.4999418 3.9223666 3.4339914
2   548316.06 3.5098469 2.6428337 3.9443235 3.4339914
3   325031.28 6.1330356 7.1053872 -.22354409 3.4339914
4   136846.98 8.6211299 5.8057308 1.138658 3.4339914
5   819957.15 1.1255184 2.93085 -1.9460882 3.4339914
6   543862.36 3.5572737 .0602616 .5137589 3.4339914
7   170787.83 8.1606376 . -1.5989237 3.4339914
8   88091.28 9.2882781 . -1.365984 3.4339914
9   67720.736 9.5684791 . -1.4901712 3.4339914
10   77790.889 9.4298762 . -1.4914914 3.4339914
11   91874.18 9.2363238 . -2.1130176 3.4339914
12   72291.15 9.5055537 . -.50683379 3.4339914
13   85128.832 9.3289832 . -1.1285694 3.4339914
14   30548.872 10.081199 . -.51043391 3.4339914
15   54036.841 9.7570505 . 2.4460087 3.4339914
16   24574.798 10.163713 . 2.160603 3.4339914
17   32021.266 10.060865 . -.58919692 3.4339914
18   20780.961 10.216123 . -1.3356586 3.4339914
19   100304.86 9.1206391 . .63233185 3.4339914
20   27408.555 10.12457 . 2.8435903 3.4339914
21   24439.885 10.165576 . -2.0015359 3.4339914
22   179989.35 8.0364822 . -.74360967 3.4339914
23   176922.6 8.0778265 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00030919
 c2  -.00037964
 c3   .00327152
 c4  -.00316205
 c5  -.00024939
 c6  -.00012684
 c7  -.00451887
 c8    .0374135
 c9  -.03128129
c10  -.01576919
c11  -.01405884
c12  -.02487523
c13   .00283214
c14   .32895962
c15  -.03583534
c16  -.03703548
c17   .04112304
c18   .34559423
c19   .01052903
c20   .31194975
c21   .09087674
c22  -.00232092
c23  -.00299208
44 3.3865438  .32092319
   
1   534283.56 3.6600519 2.4999418 3.9223666 3.4339914
2   532486.37 3.6794519 2.6428337 3.9443235 3.4339914
3   306786.14 6.3658171 7.1053872 -.22354409 3.4339914
4   151959.36 8.4156292 5.8057308 1.138658 3.4339914
5   808987.74 1.1997341 2.93085 -1.9460882 3.4339914
6   531569.46 3.6893638 .0602616 .5137589 3.4339914
7   183892.91 7.9839088 . -1.5989237 3.4339914
8   98749.219 9.1419744 . -1.365984 3.4339914
9   68529.985 9.5573351 . -1.4901712 3.4339914
10   75291.301 9.4642651 . -1.4914914 3.4339914
11   108019.37 9.0149142 . -2.1130176 3.4339914
12   81356.182 9.3808436 . -.50683379 3.4339914
13   90209.89 9.2591778 . -1.1285694 3.4339914
14   47624.053 9.8454995 . -.51043391 3.4339914
15   71896.349 9.5109881 . 2.4460087 3.4339914
16   29598.484 10.094324 . 2.160603 3.4339914
17   47036.602 9.8536042 . -.58919692 3.4339914
18   28979.786 10.102869 . -1.3356586 3.4339914
19   82836.456 9.3604921 . .63233185 3.4339914
20   14212.627 10.306877 . 2.8435903 3.4339914
21   36298.618 10.001805 . -2.0015359 3.4339914
22   165924.01 8.2263901 . -.74360967 3.4339914
23   166984.67 8.2120442 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00068725
 c2  -.00070209
 c3    .0061628
 c4  -.00467783
 c5  -.00042299
 c6  -.00026132
 c7  -.00297696
 c8   .05113227
 c9  -.02544076
c10  -.01905187
c11   -.0114194
c12  -.01444923
c13   .00134492
c14    .1693966
c15  -.02930976
c16  -.02178857
c17  -.00856988
c18   .16637924
c19   .04419811
c20   .69970529
c21   .01008981
c22  -.00407774
c23  -.00553862
46 5.0348193  .30287412
   
1   883618.61 .73711929 2.4999418 3.9223666 3.4339914
2   963510.91 .35812261 2.6428337 3.9443235 3.4339914
3   775802.16 1.4367481 7.1053872 -.22354409 3.4339914
4   349098.8 5.8295098 5.8057308 1.138658 3.4339914
5   1144170.6 0 2.93085 -1.9460882 3.4339914
6   907973.95 .60837158 .0602616 .5137589 3.4339914
7   361294.15 5.6773322 . -1.5989237 3.4339914
8   416416.5 5.0043186 . -1.365984 3.4339914
9   461492 4.4738105 . -1.4901712 3.4339914
10   475808.17 4.309399 . -1.4914914 3.4339914
11   374826.56 5.5098096 . -2.1130176 3.4339914
12   426641.77 4.8823263 . -.50683379 3.4339914
13   442690.71 4.6927766 . -1.1285694 3.4339914
14   425668.68 4.8938952 . -.51043391 3.4339914
15   400807.05 5.1923248 . 2.4460087 3.4339914
16   453971.94 4.5609832 . 2.160603 3.4339914
17   428972.06 4.8546566 . -.58919692 3.4339914
18   450185.16 4.6050869 . -1.3356586 3.4339914
19   548680.14 3.50598 . .63233185 3.4339914
20   476215.4 4.3047522 . 2.8435903 3.4339914
21   441698.1 4.7044305 . -2.0015359 3.4339914
22   601959.74 2.9573186 . -.74360967 3.4339914
23   569842.17 3.2839131 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.03099288
 c2   -.0115653
 c3  -.08782116
 c4   .49903295
 c5   .02751031
 c6  -.01934422
 c7   .40968298
 c8   -.1030727
 c9  -.00606145
c10   .00129489
c11   .02459599
c12  -.04968037
c13   .00637331
c14   -.0501909
c15   .06658242
c16   .00160955
c17   -.0221032
c18  -.00604843
c19  -.05867038
c20  -.03968852
c21  -.00427224
c22   -.0212743
c23   .01686576
47 3.3281394  6.4795709
   
1   495288.88 4.0890195 2.4999418 3.9223666 3.4339914
2   460736.69 4.4825412 2.6428337 3.9443235 3.4339914
3   216758.08 7.5437651 7.1053872 -.22354409 3.4339914
4   237781.42 7.2647759 5.8057308 1.138658 3.4339914
5   765182.27 1.5164713 2.93085 -1.9460882 3.4339914
6   482551.15 4.232675 .0602616 .5137589 3.4339914
7   255691.42 7.0288576 . -1.5989237 3.4339914
8   169568.16 8.177118 . -1.365984 3.4339914
9   128689.43 8.7323385 . -1.4901712 3.4339914
10   123229.31 8.8068766 . -1.4914914 3.4339914
11   197112.16 7.806321 . -2.1130176 3.4339914
12   157807.45 8.3363 . -.50683379 3.4339914
13   155512.71 8.3674146 . -1.1285694 3.4339914
14   137731.94 8.609077 . -.51043391 3.4339914
15   162653.9 8.2706448 . 2.4460087 3.4339914
16   113409.8 8.9411206 . 2.160603 3.4339914
17   136936.12 8.6199157 . -.58919692 3.4339914
18   115955.89 8.9062895 . -1.3356586 3.4339914
19   38390.025 9.9729325 . .63233185 3.4339914
20   88761.993 9.2790646 . 2.8435903 3.4339914
21   124553.82 8.7887879 . -2.0015359 3.4339914
22   122953.65 8.8106419 . -.74360967 3.4339914
23   152568.66 8.4073589 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00688726
 c2   -.0077153
 c3   .10746126
 c4  -.02087072
 c5  -.00331393
 c6   -.0028233
 c7   .01254905
 c8   .09255897
 c9  -.01050759
c10  -.04494189
c11  -.01202352
c12  -.00361237
c13  -.00875607
c14   .05113815
c15  -.03247043
c16  -.03241197
c17   -.0123131
c18   .00975007
c19   .74942814
c20   .16195091
c21  -.00302375
c22   .05172604
c23  -.04621126
50 4.0534603  .88368883
   
1   268534.94 6.860744 2.4999418 3.9223666 3.4339914
2   323274 6.1553579 2.6428337 3.9443235 3.4339914
3   259324.26 6.981213 7.1053872 -.22354409 3.4339914
4   303402.5 6.4092301 5.8057308 1.138658 3.4339914
5   543877.22 3.557115 2.93085 -1.9460882 3.4339914
6   273508.13 6.7958987 .0602616 .5137589 3.4339914
7   446072.8 4.653138 . -1.5989237 3.4339914
8   364663.73 5.6354853 . -1.365984 3.4339914
9   219884 7.5021489 . -1.4901712 3.4339914
10   205054 7.6999791 . -1.4914914 3.4339914
11   296472.46 6.498374 . -2.1130176 3.4339914
12   245721.92 7.1599728 . -.50683379 3.4339914
13   223934.55 7.4482911 . -1.1285694 3.4339914
14   303795.98 6.4041779 . -.51043391 3.4339914
15   319608.22 6.2019914 . 2.4460087 3.4339914
16   255720.91 7.0284705 . 2.160603 3.4339914
17   273289.14 6.7987511 . -.58919692 3.4339914
18   261003.92 6.9592089 . -1.3356586 3.4339914
19   209695.25 7.6379592 . .63233185 3.4339914
20   252712.56 7.0679787 . 2.8435903 3.4339914
21   265135.83 6.9051463 . -2.0015359 3.4339914
22   118896.18 8.8660855 . -.74360967 3.4339914
23   99868.342 9.1266254 . -.55658317 3.4339914

beta[23,1]
             c1
 c1    .1858728
 c2   .02581135
 c3   .05185367
 c4   .06565679
 c5   -.0245145
 c6   .06518719
 c7  -.01862595
 c8  -.01397278
 c9  -.01531845
c10  -.01286927
c11  -.01193244
c12  -.00323908
c13    .0617786
c14  -.00328359
c15  -.00323944
c16   -.0074767
c17  -.00554212
c18    .0017164
c19   -.0811411
c20  -.01953605
c21  -.00178474
c22   .22200839
c23   .54252917
51 3.8654837  1.9203372
   
1   325945.8 6.1214271 2.4999418 3.9223666 3.4339914
2   323610.39 6.1510831 2.6428337 3.9443235 3.4339914
3   186873.11 7.9438112 7.1053872 -.22354409 3.4339914
4   294549.38 6.5231653 5.8057308 1.138658 3.4339914
5   597343.15 3.0034673 2.93085 -1.9460882 3.4339914
6   316458.09 6.2421383 .0602616 .5137589 3.4339914
7   400812.58 5.1922579 . -1.5989237 3.4339914
8   315155.35 6.2587607 . -1.365984 3.4339914
9   188934.1 7.916102 . -1.4901712 3.4339914
10   173441.14 8.1248045 . -1.4914914 3.4339914
11   275059.28 6.7757025 . -2.1130176 3.4339914
12   221508.49 7.4805398 . -.50683379 3.4339914
13   202668.73 7.7318897 . -1.1285694 3.4339914
14   260561.91 6.9649979 . -.51043391 3.4339914
15   280701.38 6.7023612 . 2.4460087 3.4339914
16   214384.81 7.5753912 . 2.160603 3.4339914
17   236527.67 7.281353 . -.58919692 3.4339914
18   219615.81 7.5057177 . -1.3356586 3.4339914
19   144677.06 8.5145675 . .63233185 3.4339914
20   203913.23 7.7152375 . 2.8435903 3.4339914
21   225837.65 7.4230135 . -2.0015359 3.4339914
22   51112.722 9.7973762 . -.74360967 3.4339914
23   74905.643 9.4695718 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .05116635
 c2   .03092483
 c3   .11911071
 c4   .00759216
 c5  -.01328908
 c6   .03620713
 c7  -.00660251
 c8  -.00542444
 c9  -.00005639
c10  -.03897318
c11  -.00186453
c12   .00100704
c13   .00219301
c14   -.0010446
c15   .00026601
c16   -.0020259
c17   .00002752
c18    .0009855
c19  -.03270859
c20  -.01154949
c21   .00040481
c22   .60952959
c23   .26608798
52 3.2000643  1.0778261
   
1   376434.92 5.4899951 2.4999418 3.9223666 3.4339914
2   375183.23 5.5054138 2.6428337 3.9443235 3.4339914
3   203488.62 7.7209182 7.1053872 -.22354409 3.4339914
4   248363.3 7.1251828 5.8057308 1.138658 3.4339914
5   649341.75 2.4998211 2.93085 -1.9460882 3.4339914
6   369584.01 5.5745387 .0602616 .5137589 3.4339914
7   346824.06 5.8580181 . -1.5989237 3.4339914
8   261292.94 6.9554242 . -1.365984 3.4339914
9   137899.23 8.6067988 . -1.4901712 3.4339914
10   122683.47 8.8143324 . -1.4914914 3.4339914
11   225033.45 7.433693 . -2.1130176 3.4339914
12   171665.55 8.1487811 . -.50683379 3.4339914
13   154383.07 8.382738 . -1.1285694 3.4339914
14   206651.87 7.6786164 . -.51043391 3.4339914
15   227079.53 7.4065279 . 2.4460087 3.4339914
16   160810.71 8.2956051 . 2.160603 3.4339914
17   183431.92 7.9901144 . -.58919692 3.4339914
18   166003.51 8.2253146 . -1.3356586 3.4339914
19   93453.738 9.2146384 . .63233185 3.4339914
20   149908.38 8.4434771 . 2.8435903 3.4339914
21   172446.03 8.1382406 . -2.0015359 3.4339914
22   5336.8242 10.429532 . -.74360967 3.4339914
23   47073.757 9.8530916 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00090601
 c2  -.00023213
 c3   -.0027076
 c4  -.00118355
 c5   .00011903
 c6   -.0002407
 c7  -.00011453
 c8  -.00081594
 c9  -.00092588
c10   .01040563
c11   .00002553
c12  -.00070589
c13  -.00129917
c14  -.00073456
c15   .00022957
c16   .00046153
c17  -.00010599
c18  -.00047565
c19   .01959569
c20  -.00033581
c21  -.00020166
c22   .89136843
c23   .08914359
53 2.7193771  .13285501
   
1   400078.4 5.2011523 2.4999418 3.9223666 3.4339914
2   387392.32 5.3555595 2.6428337 3.9443235 3.4339914
3   194302.32 7.8440088 7.1053872 -.22354409 3.4339914
4   246621.12 7.1481251 5.8057308 1.138658 3.4339914
5   671876.69 2.2929755 2.93085 -1.9460882 3.4339914
6   390800.19 5.313949 .0602616 .5137589 3.4339914
7   329174.18 6.0804942 . -1.5989237 3.4339914
8   242745.55 7.1992185 . -1.365984 3.4339914
9   131779.78 8.6901869 . -1.4901712 3.4339914
10   117560.9 8.8843408 . -1.4914914 3.4339914
11   218897.24 7.5152811 . -2.1130176 3.4339914
12   166627.58 8.2168735 . -.50683379 3.4339914
13   151882.52 8.4166723 . -1.1285694 3.4339914
14   191526.25 7.8812758 . -.51043391 3.4339914
15   213385.14 7.5887203 . 2.4460087 3.4339914
16   147979.83 8.469675 . 2.160603 3.4339914
17   171926.72 8.1452537 . -.58919692 3.4339914
18   152937.47 8.4023534 . -1.3356586 3.4339914
19   70168.142 9.5347794 . .63233185 3.4339914
20   133731.19 8.663584 . 2.8435903 3.4339914
21   160147.43 8.30459 . -2.0015359 3.4339914
22   26196.638 10.14131 . -.74360967 3.4339914
23   68458.52 9.5583192 . -.55658317 3.4339914

beta[23,1]
             c1
 c1  -.00563341
 c2  -.00217582
 c3    .0399049
 c4  -.00630214
 c5   -.0000713
 c6  -.00106589
 c7  -.00029243
 c8  -.00041708
 c9  -.00448887
c10   .03433313
c11  -.00043701
c12  -.00271997
c13  -.00612004
c14  -.00250785
c15  -.00060529
c16   7.489e-06
c17  -.00077085
c18  -.00164271
c19   .25553945
c20   -.0072269
c21  -.00090827
c22   .69416388
c23   .02172048
54 2.9695766  .52868381
   
1   372777.71 5.5350806 2.4999418 3.9223666 3.4339914
2   419932.67 4.9622633 2.6428337 3.9443235 3.4339914
3   286620.66 6.6256211 7.1053872 -.22354409 3.4339914
4   198040.58 7.7938755 5.8057308 1.138658 3.4339914
5   647947.56 2.512851 2.93085 -1.9460882 3.4339914
6   380344.98 5.4419111 .0602616 .5137589 3.4339914
7   344253.26 5.8902827 . -1.5989237 3.4339914
8   266610.46 6.8858752 . -1.365984 3.4339914
9   116413.73 8.9000279 . -1.4901712 3.4339914
10   102734.7 9.0873248 . -1.4914914 3.4339914
11   189630.36 7.9067449 . -2.1130176 3.4339914
12   139470.28 8.585408 . -.50683379 3.4339914
13   117468.95 8.8855981 . -1.1285694 3.4339914
14   203399.71 7.7221078 . -.51043391 3.4339914
15   216629.5 7.5454778 . 2.4460087 3.4339914
16   156024.83 8.3604692 . 2.160603 3.4339914
17   170456.34 8.1651162 . -.58919692 3.4339914
18   161090.36 8.2918174 . -1.3356586 3.4339914
19   139746.43 8.5816489 . .63233185 3.4339914
20   158647.56 8.3249132 . 2.8435903 3.4339914
21   163845.28 8.2545174 . -2.0015359 3.4339914
22   90058.845 9.2612522 . -.74360967 3.4339914
23   38501.157 9.9713984 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .04794521
 c2  -.00676995
 c3   -.0141132
 c4   .07666251
 c5  -.00433432
 c6   .00299053
 c7  -.01124176
 c8  -.00952961
 c9  -.04032565
c10   .14575704
c11  -.01325327
c12  -.01520427
c13   .15429444
c14  -.00291426
c15  -.00706407
c16  -.01578561
c17  -.01168907
c18   .00186152
c19  -.02512354
c20  -.01586519
c21   -.0057939
c22  -.02818889
c23   .78918685
57 2.9178459  .86770932
   
1   241388.19 7.2171316 2.4999418 3.9223666 3.4339914
2   346404.22 5.863284 2.6428337 3.9443235 3.4339914
3   608898.99 2.8884661 7.1053872 -.22354409 3.4339914
4   800403.46 1.2592581 5.8057308 1.138658 3.4339914
5   36053.006 10.005196 2.93085 -1.9460882 3.4339914
6   247714.83 7.1337205 .0602616 .5137589 3.4339914
7   955492.07 .3904371 . -1.5989237 3.4339914
8   872829.2 .79773579 . -1.365984 3.4339914
9   729328.88 1.799031 . -1.4901712 3.4339914
10   714623.4 1.9207465 . -1.4914914 3.4339914
11   801883.97 1.2489023 . -2.1130176 3.4339914
12   753508.71 1.6062211 . -.50683379 3.4339914
13   731392.37 1.7822185 . -1.1285694 3.4339914
14   813131.94 1.1714508 . -.51043391 3.4339914
15   829216.55 1.0645042 . 2.4460087 3.4339914
16   765082.73 1.5172273 . 2.160603 3.4339914
17   782887.94 1.3845888 . -.58919692 3.4339914
18   770385.61 1.477179 . -1.3356586 3.4339914
19   706656.7 1.988063 . .63233185 3.4339914
20   760353.32 1.5533307 . 2.8435903 3.4339914
21   774703.52 1.4449097 . -2.0015359 3.4339914
22   612284.03 2.855105 . -.74360967 3.4339914
23   608674.32 2.8906855 . -.55658317 3.4339914

beta[23,1]
             c1
 c1   .06938209
 c2   .03022778
 c3  -.00749451
 c4  -.00127231
 c5   .86164863
 c6   .05428098
 c7  -.00483311
 c8  -.00048389
 c9   .00013787
c10    .0006159
c11     .000289
c12   .00017082
c13  -.00027577
c14    .0000582
c15   .00056943
c16   .00017418
c17   .00016119
c18  -.00003027
c19   .00038019
c20   .00006738
c21   .00003075
c22  -.00423626
c23  -.00445753
58 2.1911964  .86403036
   

. 
. matrix ones58==J(1,58,1)

. matrix sum_mao=ones58*mao

. matrix list sum_mao

sum_mao[1,3]
         c1       c2       c3
r1     3309    12435  2833524

. 
. di sqrt(sum_mao[1,3])
1683.3075

. matrix list mao

mao[58,3]
          c1       c2       c3
 r1      139     1023   226074
 r2        5       17       13
 r3       14       76      375
 r4       40      295    75520
 r5       58      174    23372
 r6        3       16       17
 r7       19       94      732
 r8       11       37       44
 r9       53      170    10017
r10        0        0        0
r11      234     1070   178904
r12      124      185     5581
r13       33      114     2079
r14      689     2720  1841440
r15      101      431    22160
r16        9       17      128
r17       13       27      195
r18        6       11       26
r19       29       71      562
r20       89      173    14280
r21       21      103       84
r22        8       32       21
r23       26       51     1250
r24       45       93      701
r25       31       41       83
r26       64      187    23188
r27       46      116      763
r28       28       65      809
r29        6       17       11
r30       60      160      765
r31       34       90      282
r32       57      167     3720
r33       33      112      896
r34        8       26       50
r35      103      401     4503
r36       75      441    80703
r37       74      414    46920
r38        2        5        1
r39        2        5        0
r40       30       85     4760
r41       23       56      125
r42       20      107       64
r43       14       29      235
r44        2        7        1
r45      120      488    45169
r46       11       55       37
r47       81      270    42512
r48       51      320    86400
r49        5        7        9
r50        6       24       32
r51      140      541    37639
r52      119      381    15263
r53       21       57       59
r54        8       24       34
r55       15       40     1040
r56       38      109     7848
r57      167      487    24200
r58       46      101     1828

. 
. scalar nestim2=nestim/sum_mao[1,1]

. di nlags,nestim,nestim2
6 2018 .60985192

. 
end of do-file

mao[58,3]
          c1       c2       c3
 r1      139     1023   226074
 r2        5       17       13
 r3       14       76      375
 r4       40      295    75520
 r5       58      174    23372
 r6        3       16       17
 r7       19       94      732
 r8       11       37       44
 r9       53      170    10017
r10        0        0        0
r11      234     1070   178904
r12      124      185     5581
r13       33      114     2079
r14      689     2720  1841440
r15      101      431    22160
r16        9       17      128
r17       13       27      195
r18        6       11       26
r19       29       71      562
r20       89      173    14280
r21       21      103       84
r22        8       32       21
r23       26       51     1250
r24       45       93      701
r25       31       41       83
r26       64      187    23188
r27       46      116      763
r28       28       65      809
r29        6       17       11
r30       60      160      765
r31       34       90      282
r32       57      167     3720
r33       33      112      896
r34        8       26       50
r35      103      401     4503
r36       75      441    80703
r37       74      414    46920
r38        2        5        1
r39        2        5        0
r40       30       85     4760
r41       23       56      125
r42       20      107       64
r43       14       29      235
r44        2        7        1
r45      120      488    45169
r46       11       55       37
r47       81      270    42512
r48       51      320    86400
r49        5        7        9
r50        6       24       32
r51      140      541    37639
r52      119      381    15263
r53       21       57       59
r54        8       24       34
r55       15       40     1040
r56       38      109     7848
r57      167      487    24200
r58       46      101     1828

sum_mao[1,3]
         c1       c2       c3
r1     3309    12435  2833524

modelmat[7,1]
    c1
r1  17
r2   0
r3   2
r4   3
r5   0
r6   0
r7   1
perpe:  3
depmean:  3.4339914
depvar:  10.503286
depvar1:  3.5273167
depvar2:  6.9759698
nlags:  6
nstrata:  23
nestim:  2018
nestimratio:  .60985192
nestime:  8123.4031
nestimv:  2654271.7

.  /*Original*/
. matrix maotot=mao_est+mao_sl+mao_ot

. matrix list maotot

maotot[58,3]
          c1       c2       c3
 r1      657     1991   245706
 r2       48       67       37
 r3       66      141     1084
 r4      143      456    78520
 r5      234      567    50935
 r6       43       68      424
 r7       71      174     1622
 r8       39       74      120
 r9      274     1905  2396335
r10       40       50      397
r11     1479     3314   221640
r12      297      690    31953
r13       57      156     2408
r14     3219     7110  1917606
r15      264      653    25515
r16       87      194    11668
r17      117      257    12992
r18       77      107     1966
r19      363     1010   189364
r20      777     1528    72431
r21      112      240      612
r22      136      203      886
r23      399      702    15118
r24      212      355     7878
r25     1409     2412    12096
r26      425      897    37543
r27      241      467     4442
r28      254      649    12243
r29      151      339     2031
r30      264      511     6515
r31      447     1088    38113
r32      598     1517   227072
r33      312      781    20624
r34      184      274     5155
r35      785     1286     8048
r36     1124     2573   181394
r37      732     1535    56291
r38       31       68      211
r39       55       90       64
r40      392      885    13808
r41      145      387    17112
r42      156      328      810
r43      121      247     2874
r44       51      117     1151
r45      891     1665   136496
r46      204      504     5329
r47      430      875    50113
r48      516      984   102701
r49       36       84      646
r50      123      206     5359
r51      572     1140    53668
r52      448     1095    77358
r53      142      195      516
r54       34       57       83
r55       89      128     1478
r56      170      289    10806
r57     1082     2076   390846
r58      125      279    13304

. matrix sumtot=sum_est+sum_sl+sum_ot

. matrix list sumtot

sumtot[1,3]
         c1       c2       c3
r1    21950    48040  6783517

. matrix sumall= sum_est\sum_sl\sum_ot\sumtot

. matrix list sumall

sumall[4,3]
         c1       c2       c3
r1     9566    20516  2962674
r1     9075    15089   987319
r1     3309    12435  2833524
r1    21950    48040  6783517

. matrix maotot=mao_est+mao_sl+mao_ot

. matrix modelmat=modelmat_e,modelmat_s,modelmat_o

. matrix list modelmat

modelmat[7,3]
    c1  c1  c1
r1   4   5  17
r2   4   0   0
r3   2   0   2
r4  18   2   3
r5  20   0   0
r6   0   0   0
r7  10   2   1

. matrix ones=J(1,7,1)

. matrix modelmatt=ones*modelmat

. matrix list modelmatt

modelmatt[1,3]
    c1  c1  c1
r1  58   9  23

. 
. 
. *************************************************************************************
. *       Totals
. *************************************************************************************
. 
. /* Report Total */
. 
. matrix mao=sumall

. 
. matrix smao=mao[1...,3]

. matrix bmao=mao[1...,2]

. matrix nmao=mao[1...,1]

. 
. *matrix tmao=bmao\
. matrix cil_mao=J(4,1,0)

. matrix ciu_mao=J(4,1,0)

. forval i= 1/4{
  2. matrix smao[`i',1]=sqrt(smao[`i',1])
  3. *matrix tmao[`i',1]=bmao[`i',1]/smao[`i',1]
. matrix cil_mao[`i',1]=int(bmao[`i',1]-signi*smao[`i',1]+0.5)
  4. matrix ciu_mao[`i',1]=int(bmao[`i',1]+signi*smao[`i',1]+0.5)
  5. }

. 
. 
. matrix mao=nmao,cil_mao,bmao,ciu_mao,bmao,smao

. matrix list mao

mao[4,6]
           c1         c1         c2         c1         c2         c3
r1       9566      17074      20516      23958      20516   1721.242
r1       9075      13102      15089      17076      15089  993.63927
r1       3309       9068      12435      15802      12435  1683.3075
r1      21950      42831      48040      53249      48040  2604.5186

. 
. svmat mao, names(v)
number of observations will be reset to 4
Press any key to continue, or Break to abort
obs was 0, now 4

. ren v1 n

. ren v2 cl

. ren v3 e

. ren v4 cu

. ren v5 em

. ren v6 s

. 
. export excel n cl e cu em s using  "$excel/${name}k.xls", sheet("totals") sheetmodify firstrow(varlabels) missing(".")
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

. clear

. 
. 
. /* Report Strata */
. foreach k in mao_est mao_sl mao_ot maotot{  /*Original*/
  2. matrix mao=`k'
  3. 
. matrix smao=mao[1...,3]
  4. matrix bmao=mao[1...,2]
  5. matrix nmao=mao[1...,1]
  6. 
. *matrix tmao=bmao
. 
. matrix cil_mao=J(nstrata,1,0)
  7. matrix ciu_mao=J(nstrata,1,0)
  8. forval i= 1/58{
  9. matrix smao[`i',1]=sqrt(smao[`i',1])
 10. *matrix tmao[`i',1]=bmao[`i',1]/smao[`i',1]
. matrix cil_mao[`i',1]=int(bmao[`i',1]-signi*smao[`i',1]+0.5)
 11. matrix ciu_mao[`i',1]=int(bmao[`i',1]+signi*smao[`i',1]+0.5)
 12. }
 13. 
. matrix mao=nmao,cil_mao,bmao,ciu_mao,bmao,smao
 14. matrix list mao
 15. 
. 
. svmat mao, names(v)
 16. ren v1 n
 17. ren v2 cl
 18. ren v3 e
 19. ren v4 cu
 20. ren v5 em
 21. ren v6 s
 22. 
. export excel n cl e cu em s using "$excel/${name}k.xls", sheet("s`k'") sheetmodify firstrow(varlabels) missing(".")
 23. clear
 24. 
. 
. }

mao[58,6]
            c1         c1         c2         c1         c2         c3
 r1        367        585        767        949        767    90.8185
 r2         42         39         48         57         48  4.6904158
 r3         29         27         31         35         31          2
 r4         57         48         95        142         95  23.388031
 r5         71         80        206        332        206  62.920585
 r6         22         20         26         32         26          3
 r7         40          9         61        113         61  25.922963
 r8         23         17         29         41         29   6.164414
 r9        185      -1408       1679       4767       1679   1544.158
r10         19         17         20         23         20  1.4142136
r11        675       1186       1552       1918       1552  183.00546
r12        141        139        453        767        453  157.01592
r13         12          0         25         50         25  12.369317
r14       1260       2390       2762       3134       2762  185.94623
r15         68         72         96        120         96  12.206556
r16         26        -80        114        309        114  97.488461
r17         47        -77        140        358        140  109.10545
r18         17         13         24         35         24  5.3851648
r19        168       -137        699       1536        699  418.60483
r20        341        471        744       1017        744  136.25344
r21         68         49         91        133         91  20.808652
r22         68         67         70         73         70  1.4142136
r23        199        268        371        474        371  51.458721
r24         37         27         44         61         44   8.660254
r25        956       1298       1413       1528       1413  57.532599
r26        156        190        287        384        287  48.394215
r27         68         59         83        107         83  12.247449
r28        144        245        434        623        434  94.736477
r29         47         47         75        103         75  13.820275
r30         72         68         95        122         95  13.453624
r31        161        221        499        777        499   138.7768
r32        378        468        599        730        599   65.74192
r33         89          5        188        371        188  91.733309
r34         62         64        132        200        132  33.985291
r35        436        538        591        644        591  26.286879
r36        623        977       1495       2013       1495  258.96525
r37        489        609        750        891        750  70.554943
r38         17          6         33         60         33  13.453624
r39         32         30         33         36         33  1.4142136
r40        137        151        173        195        173   11.18034
r41        101          3        263        523        263  130.11149
r42         55         54         64         74         64          5
r43         79         51        151        251        151  50.199602
r44         43         25         93        161         93  33.837849
r45        362        468        610        752        610  71.182863
r46         70         78        201        324        201  61.497967
r47         91        102        130        158        130  14.071247
r48        145        167        238        309        238  35.679126
r49         23          6         56        106         56  25.019992
r50         35         -6         57        121         57  31.811947
r51        111        109        172        235        172  31.638584
r52        170         63        500        937        500  218.49485
r53         94         95        102        109        102  3.4641016
r54         19         16         24         32         24  4.1231056
r55         48         45         53         61         53  4.1231056
r56         60         51         83        115         83  15.874508
r57        139        130        525        920        525  197.43353
r58         72        -46        167        381        167  106.77078
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

mao[58,6]
            c1         c1         c2         c1         c2         c3
 r1        151        -11        201        414        201  106.69583
 r2          1          0          2          5          2  1.4142136
 r3         23        -18         34         87         34  26.551836
 r4         46        -32         66        165         66   49.52777
 r5        105       -119        187        494        187  153.63593
 r6         18        -13         26         66         26  19.949937
 r7         12        -10         19         49         19  14.764823
 r8          5         -3          8         20          8   6.164414
 r9         36        -30         56        143         56   43.52011
r10         21         -9         30         70         30  19.874607
r11        570        500        692        884        692  96.150923
r12         32        -30         52        135         52  41.448764
r13         12         -9         17         44         17  13.266499
r14       1270       1220       1628       2036       1628  203.93626
r15         95         13        126        239        126  56.621551
r16         52        -26         63        153         63  45.122057
r17         57         30         90        150         90  29.883106
r18         54        -14         72        159         72  43.714986
r19        166          7        240        473        240  116.49893
r20        347        213        611       1009        611  198.96231
r21         23         27         46         65         46  9.7467943
r22         60         42        101        160        101  29.376862
r23        174         68        280        492        280   105.9245
r24        130         49        218        387        218  84.273365
r25        422        771        958       1145        958  93.289871
r26        205        204        423        642        423  109.60383
r27        127        149        268        387        268  59.405387
r28         82         51        150        249        150  49.588305
r29         98        161        247        333        247   42.76681
r30        132        107        256        405        256  74.625733
r31        252        226        499        772        499  136.27913
r32        163       -184        751       1687        751  468.00641
r33        190        268        481        694        481  106.36259
r34        114         -9        116        242        116  62.849025
r35        246        187        294        401        294  53.422842
r36        426        270        637       1004        637  183.37939
r37        169        238        371        504        371   66.27971
r38         12         19         30         41         30  5.3851648
r39         21         36         52         68         52  7.8740079
r40        225        438        627        816        627  94.461632
r41         21         53         68         83         68  7.6157731
r42         81        103        157        211        157  26.851443
r43         28         45         67         89         67  10.908712
r44          6         13         17         21         17   2.236068
r45        409        -19        567       1154        567  293.70053
r46        123        170        248        326        248  38.858718
r47        258        303        475        647        475  86.040688
r48        320        181        426        671        426  122.58874
r49          8         14         21         28         21  3.3166248
r50         82         -5        125        256        125   65.68866
r51        321        182        427        672        427  122.58874
r52        159        -25        214        454        214  119.81235
r53         27         -5         36         78         36  21.095023
r54          7         -1          9         20          9  5.6568542
r55         26         -5         35         76         35  20.518285
r56         72         -6         97        201         97  52.019227
r57        776        -80       1064       2209       1064  572.42117
r58          7         -5         11         28         11  8.7177979
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

mao[58,6]
            c1         c1         c2         c1         c2         c3
 r1        139         72       1023       1974       1023   475.4724
 r2          5         10         17         24         17  3.6055513
 r3         14         37         76        115         76  19.364917
 r4         40       -254        295        845        295  274.80902
 r5         58       -131        174        480        174  152.87904
 r6          3          8         16         24         16  4.1231056
 r7         19         40         94        148         94  27.055499
 r8         11         24         37         50         37  6.6332496
 r9         53        -29        170        370        170  100.08496
r10          0          0          0          0          0          0
r11        234        224       1070       1916       1070  422.97045
r12        124         36        185        334        185  74.706091
r13         33         23        114        205        114  45.596052
r14        689          6       2720       5434       2720  1356.9967
r15        101        133        431        729        431  148.86235
r16          9         -5         17         40         17  11.313708
r17         13          0         27         55         27   13.96424
r18          6          1         11         21         11  5.0990195
r19         29         24         71        118         71  23.706539
r20         89        -65        173        412        173  119.49895
r21         21         85        103        121        103  9.1651514
r22          8         23         32         41         32  4.5825757
r23         26        -19         51        122         51  35.355339
r24         45         40         93        146         93  26.476405
r25         31         23         41         59         41  9.1104336
r26         64       -117        187        492        187  152.27607
r27         46         61        116        171        116  27.622455
r28         28          8         65        122         65  28.442925
r29          6         10         17         24         17  3.3166248
r30         60        105        160        215        160  27.658633
r31         34         56         90        124         90  16.792856
r32         57         45        167        289        167  60.991803
r33         33         52        112        172        112  29.933259
r34          8         12         26         40         26  7.0710678
r35        103        267        401        535        401  67.104396
r36         75       -126        441       1009        441  284.08273
r37         74        -18        414        847        414  216.61025
r38          2          3          5          7          5          1
r39          2          5          5          5          5          0
r40         30        -52         85        223         85  68.992753
r41         23         34         56         78         56   11.18034
r42         20         91        107        123        107          8
r43         14         -1         29         60         29   15.32971
r44          2          5          7          9          7          1
r45        120         63        488        913        488     212.53
r46         11         43         55         67         55  6.0827625
r47         81       -141        270        682        270  206.18438
r48         51       -267        320        908        320  293.93877
r49          5          1          7         13          7          3
r50          6         13         24         35         24  5.6568542
r51        140        153        541        929        541  194.00773
r52        119        134        381        628        381  123.54351
r53         21         42         57         72         57  7.6811457
r54          8         12         24         36         24  5.8309519
r55         15        -23         40        104         40  32.249031
r56         38        -67        109        286        109  88.588938
r57        167        176        487        798        487  155.56349
r58         46         15        101        187        101  42.755117
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

mao[58,6]
            c1         c1         c2         c1         c2         c3
 r1        657       1000       1991       2982       1991   495.6874
 r2         48         55         67         79         67  6.0827625
 r3         66         75        141        207        141  32.924155
 r4        143       -103        456       1016        456   280.2142
 r5        234        116        567       1018        567  225.68784
 r6         43         27         68        109         68   20.59126
 r7         71         93        174        255        174  40.274061
 r8         39         52         74         96         74  10.954451
 r9        274      -1190       1905       5001       1905    1548.01
r10         40         10         50         90         50  19.924859
r11       1479       2372       3314       4256       3314  470.78658
r12        297        332        690       1048        690  178.75402
r13         57         58        156        254        156  49.071377
r14       3219       4340       7110       9880       7110  1384.7765
r15        264        334        653        972        653  159.73415
r16         87        -21        194        410        194  108.01852
r17        117         29        257        485        257  113.98245
r18         77         18        107        196        107  44.339599
r19        363        140       1010       1880       1010  435.15974
r20        777        990       1528       2066       1528  269.13008
r21        112        191        240        289        240  24.738634
r22        136        143        203        263        203  29.765752
r23        399        456        702        948        702  122.95528
r24        212        177        355        533        355  88.758098
r25       1409       2192       2412       2632       2412  109.98182
r26        425        509        897       1285        897  193.76016
r27        241        334        467        600        467  66.648331
r28        254        428        649        870        649  110.64809
r29        151        249        339        429        339  45.066617
r30        264        350        511        672        511   80.71555
r31        447        698       1088       1478       1088  195.22551
r32        598        564       1517       2470       1517  476.52072
r33        312        494        781       1068        781  143.61058
r34        184        130        274        418        274  71.798329
r35        785       1107       1286       1465       1286  89.710646
r36       1124       1721       2573       3425       2573  425.90374
r37        732       1060       1535       2010       1535  237.25724
r38         31         39         68         97         68  14.525839
r39         55         74         90        106         90          8
r40        392        650        885       1120        885  117.50745
r41        145        125        387        649        387  130.81284
r42        156        271        328        385        328  28.460499
r43        121        140        247        354        247  53.609701
r44         51         49        117        185        117  33.926391
r45        891        926       1665       2404       1665  369.45365
r46        204        358        504        650        504         73
r47        430        427        875       1323        875  223.85933
r48        516        343        984       1625        984  320.46997
r49         36         33         84        135         84   25.41653
r50        123         60        206        352        206  73.205191
r51        572        677       1140       1603       1140  231.66355
r52        448        539       1095       1651       1095  278.13306
r53        142        150        195        240        195  22.715633
r54         34         39         57         75         57  9.1104336
r55         89         51        128        205        128  38.444766
r56        170         81        289        497        289  103.95191
r57       1082        826       2076       3326       2076  625.17678
r58        125         48        279        510        279  115.34297
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

. 
. 
. 
. 
. /* Report regions */
. run "$code/regions"

. foreach k in mao_est mao_sl mao_ot maotot{   /*Origintal*/
  2. matrix mao=`k'
  3. 
. matrix mao=region'*mao
  4. scalar nregion=rowsof(mao)
  5. 
. matrix smao=mao[1...,3]
  6. matrix bmao=mao[1...,2]
  7. matrix nmao=mao[1...,1]
  8. 
. *matrix tmao=bmao
. 
. matrix cil_mao=J(nregion,1,0)
  9. matrix ciu_mao=J(nregion,1,0)
 10. forval i= 1/8{
 11. matrix smao[`i',1]=sqrt(smao[`i',1])
 12. *matrix tmao[`i',1]=bmao[`i',1]/smao[`i',1]
. matrix cil_mao[`i',1]=int(bmao[`i',1]-signi*smao[`i',1]+0.5)
 13. matrix ciu_mao[`i',1]=int(bmao[`i',1]+signi*smao[`i',1]+0.5)
 14. }
 15. 
. 
. matrix mao=nmao,cil_mao,bmao,ciu_mao,bmao,smao
 16. matrix list mao
 17. 
. 
. svmat mao, names(v)
 18. ren v1 n
 19. ren v2 cl
 20. ren v3 e
 21. ren v4 cu
 22. ren v5 em
 23. ren v6 s
 24. 
. export excel n cl e cu em s using "$excel/${name}k.xls", sheet("r`k'") sheetmodify firstrow(varlabels) missing(".")
 25. clear
 26. }

mao[8,6]
           c1         c1         c2         c1         c2         c3
c1       5209       8797      10005      11213      10005  603.95116
c2        709        961       1555       2149       1555  296.93097
c3       1344       2524       2954       3384       2954  214.77663
c4        766       1315       1682       2049       1682  183.54563
c5        542        734        905       1076        905  85.743804
c6        250      -1331       1756       4844       1756  1544.1775
c7        746       1269       1659       2049       1659   195.1794
c8       9566      17074      20516      23958      20516   1721.242
number of observations will be reset to 8
Press any key to continue, or Break to abort
obs was 0, now 8
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

mao[8,6]
           c1         c1         c2         c1         c2         c3
c1       4214       7168       8459       9750       8459  645.41305
c2       1483        802       2008       3214       2008  603.20726
c3       1289       1247       1656       2065       1656  204.55317
c4        828        909       1167       1425       1167  129.02713
c5        811        468       1118       1768       1118  324.96615
c6         42        -21         66        154         66  43.977267
c7        408        211        615       1019        615  202.17567
c8       9075      13102      15089      17076      15089  993.63927
number of observations will be reset to 8
Press any key to continue, or Break to abort
obs was 0, now 8
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

mao[8,6]
           c1         c1         c2         c1         c2         c3
c1        974       2310       3171       4032       3171  430.31616
c2        609       1412       2070       2728       2070  329.00304
c3        768        218       2935       5652       2935  1358.4355
c4        315        399       1340       2281       1340  470.54862
c5        177        106        832       1558        832  362.76852
c6         69         23        224        425        224  100.36932
c7        397        711       1863       3015       1863  575.90885
c8       3309       9068      12435      15802      12435  1683.3075
number of observations will be reset to 8
Press any key to continue, or Break to abort
obs was 0, now 8
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

mao[8,6]
           c1         c1         c2         c1         c2         c3
c1      10397      19669      21635      23601      21635  983.10071
c2       2801       4136       5633       7130       5633  748.51186
c3       3401       4764       7545      10326       7545  1390.4381
c4       1909       3146       4189       5232       4189  521.29934
c5       1530       1866       2855       3844       2855  494.52604
c6        361      -1049       2046       5142       2046  1548.0607
c7       1551       2855       4137       5419       4137  640.81277
c8      21950      42831      48040      53249      48040  2604.5186
number of observations will be reset to 8
Press any key to continue, or Break to abort
obs was 0, now 8
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

. 
. 
. *************************************************************************************
. *       Differences
. *************************************************************************************
. 
. /* Report Total */
. matrix mao=sumall

. matrix dmao=mao[2,1..2]-mao[1,1..2]    /*d*/

. matrix smao=sqrt(mao[2,3]+mao[1,3])   /*t*/

. matrix tmao=dmao[1,2]/smao[1,1]    /*t*/

. matrix pmao=1-normal(abs(tmao[1,1]))    /*p*/

. matrix cil_mao=int(dmao[1,2]-signi*smao[1,1]+0.5)

. matrix ciu_mao=int(dmao[1,2]+signi*smao[1,1]+0.5)

. matrix smao=int(smao[1,1]+0.5)   /*t*/

. matrix dmao=dmao,smao,tmao,pmao,cil_mao,ciu_mao

. matrix list dmao

dmao[1,7]
            c1          c2          c1          c1          c1          c1          c1
r1        -491       -5427        1987  -2.7306225   .00316074       -9401       -1451

. 
. svmat dmao, names(v)
number of observations will be reset to 1
Press any key to continue, or Break to abort
obs was 0, now 1

. ren v1 n

. ren v2 e

. ren v3 s

. ren v4 t

. ren v5 p

. ren v6 cl

. ren v7 cu

. format %7.4f  p

. export excel n e s t p cl cu using "$excel/${name}k.xls", sheet("dmao") sheetmodify firstrow(varlabels) missing(".")
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

. clear

. 
. 
. /* Report Strata */
. matrix dmao=mao_sl[1..58,1..2]-mao_est[1..58,1..2]    /*d*/

. matrix smao=mao_sl[1..58,3]+mao_est[1..58,3]   /*v*/

. 
. matrix tmao=J(nstrata,1,0)

. matrix pmao=J(nstrata,1,0)

. matrix cil_mao=J(nstrata,1,0)

. matrix ciu_mao=J(nstrata,1,0)

. forval i= 1/58{
  2. matrix smao[`i',1]=sqrt(smao[`i',1])
  3. matrix tmao[`i',1]=dmao[`i',2]/smao[`i',1]
  4. matrix pmao[`i',1]=1-normal(abs(tmao[`i',1]))    /*p*/
  5. 
. matrix cil_mao[`i',1]=int(dmao[`i',2]-signi*smao[`i',1]+0.5)
  6. matrix ciu_mao[`i',1]=int(dmao[`i',2]+signi*smao[`i',1]+0.5)
  7. matrix smao[`i',1]=int(smao[`i',1]+0.5)   /*t*/
  8. }

. 
. matrix dmao=dmao,smao,tmao,pmao,cil_mao,ciu_mao

. matrix list dmao

dmao[58,7]
             c1          c2          c3          c1          c1          c1          c1
 r1        -216        -566         140  -4.0395609   .00002678        -845        -285
 r2         -41         -46           5  -9.3897107           0         -55         -35
 r3          -6           3          27   .11266736   .45514714         -49          56
 r4         -11         -29          55  -.52946514   .29824141        -138          81
 r5          34         -19         166   -.1144433    .4544432        -350         313
 r6          -4           0          20           0          .5         -39          40
 r7         -28         -42          30  -1.4078432   .07958875        -101          18
 r8         -18         -21           9  -2.4088652    .0080011         -37          -3
 r9        -149       -1623        1545   -1.050641   .14671174       -4712        1467
r10           2          10          20   .50188561   .30787399         -29          50
r11        -105        -860         207  -4.1600784   .00001591       -1272        -446
r12        -109        -401         162  -2.4692942   .00676899        -725         -75
r13           0          -8          18  -.44105428   .32958685         -43          28
r14          10       -1134         276  -4.1089654   .00001987       -1685        -581
r15          27          30          58   .51793468   .30225192         -85         146
r16          26         -51         107  -.47475251   .31748169        -265         164
r17          10         -50         113  -.44199354   .32924694        -275         176
r18          37          48          44   1.0897839   .13790418         -39         136
r19          -2        -459         435  -1.0563538   .14540331       -1327         410
r20           6        -133         241  -.55153496    .2906335        -614         349
r21         -45         -45          23  -1.9583736   .02509309         -90           1
r22          -8          31          29   1.0540316   .14593422         -27          90
r23         -25         -91         118  -.77274193   .21983756        -326         145
r24          93         174          85   2.0538928   .01999303           5         343
r25        -534        -455         110  -4.1513147   .00001653        -673        -235
r26          49         136         120   1.1351083   .12816497        -103         376
r27          59         185          61   3.0500491   .00114402          64         306
r28         -62        -284         107   -2.655946   .00395431        -497         -69
r29          51         172          45   3.8269498   .00006487          82         262
r30          60         161          76   2.1232051   .01686833           9         313
r31          91           0         195           0          .5        -388         389
r32        -215         152         473   .32162416   .37386872        -792        1097
r33         101         293         140   2.0860566   .01848675          12         574
r34          52         -16          71  -.22393507   .41140391        -158         127
r35        -190        -297          60  -4.9882514   3.046e-07        -415        -177
r36        -197        -858         317  -2.7039083   .00342646       -1492        -222
r37        -320        -379          97  -3.9151305   .00004518        -572        -184
r38          -5          -3          14  -.20701967   .41799725         -31          26
r39         -11          19           8       2.375   .00877448           3          35
r40          88         454          95   4.7728695   9.081e-07         264         644
r41         -80        -195         130  -1.4961539   .06730678        -455          66
r42          26          93          27   3.4049719   .00033085          38         148
r43         -51         -84          51  -1.6351575   .05100802        -186          19
r44         -37         -76          34  -2.2411177   .01250922        -143          -7
r45          47         -43         302  -.14228819   .44342619        -646         561
r46          53          47          73   .64608244   .25911298         -97         192
r47         167         345          87   3.9571611   .00003792         171         519
r48         175         188         128   1.4724845   .07044505         -66         443
r49         -15         -35          25  -1.3867505   .08275893         -84          15
r50          47          68          73    .9316817   .17575052         -77         214
r51         210         255         127   2.0141275   .02199807           2         508
r52         -11        -286         249  -1.1477247   .12554112        -783         212
r53         -67         -66          21  -3.0873498   .00100975        -108         -22
r54         -12         -15           7  -2.1428571   .01606229         -28           0
r55         -22         -18          21  -.86007327   .19487433         -59          24
r56          12          14          54    .2574121   .39843033         -94         123
r57         637         539         606   .89015429   .18669152        -671        1750
r58         -65        -156         107  -1.4562278   .07266482        -369          58

. 
. svmat dmao, names(v)
number of observations will be reset to 58
Press any key to continue, or Break to abort
obs was 0, now 58

. ren v1 n

. ren v2 e

. ren v3 s

. ren v4 t

. ren v5 p

. ren v6 cl

. ren v7 cu

. format %7.4f  p

. export excel n e s t p cl cu using "$excel/${name}k.xls", sheet("sdmao") sheetmodify firstrow(varlabels) missing(".")
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

. clear

. 
. 
. 
. 
. /* Report regions */
. matrix mao_sl=region'*mao_sl

. matrix mao_est=region'*mao_est

. 
. matrix dmao=mao_sl[1..8,1..2]-mao_est[1..8,1..2]    /*d*/

. matrix smao=mao_sl[1..8,3]+mao_est[1..8,3]   /*v*/

. 
. matrix tmao=J(nregion,1,0)

. matrix pmao=J(nregion,1,0)

. matrix cil_mao=J(nregion,1,0)

. matrix ciu_mao=J(nregion,1,0)

. forval i= 1/8{
  2. matrix smao[`i',1]=sqrt(smao[`i',1])
  3. matrix tmao[`i',1]=dmao[`i',2]/smao[`i',1]
  4. matrix pmao[`i',1]=1-normal(abs(tmao[`i',1]))    /*p*/
  5. 
. matrix cil_mao[`i',1]=int(dmao[`i',2]-signi*smao[`i',1]+0.5)
  6. matrix ciu_mao[`i',1]=int(dmao[`i',2]+signi*smao[`i',1]+0.5)
  7. matrix smao[`i',1]=int(smao[`i',1]+0.5)   /*t*/
  8. }

. 
. matrix dmao=dmao,smao,tmao,pmao,cil_mao,ciu_mao

. matrix list dmao

dmao[8,7]
            c1          c2          c3          c1          c1          c1          c1
c1        -995       -1546         884  -1.7490266   .04014321       -3313         222
c2         774         453         672   .67377674   .25022663        -891        1798
c3         -55       -1298         297  -4.3762783   6.036e-06       -1890        -704
c4          62        -515         224  -2.2954274   .01085432        -963         -65
c5         269         213         336   .63376299   .26311776        -458         885
c6        -208       -1690        1545  -1.0939902   .13697963       -4779        1400
c7        -338       -1044         281  -3.7150908   .00010157       -1605        -481
c8        -491       -5427        1987  -2.7306225   .00316074       -9401       -1451

. 
. svmat dmao, names(v)
number of observations will be reset to 8
Press any key to continue, or Break to abort
obs was 0, now 8

. ren v1 n

. ren v2 e

. ren v3 s

. ren v4 t

. ren v5 p

. ren v6 cl

. ren v7 cu

. format %7.4f  p

. export excel n e s t p cl cu using "$excel/${name}k.xls", sheet("rdmao") sheetmodify firstrow(varlabels) missing(".")
file C:/Users/silvio/Documents/CVR/ryp/excel/s2_dokrigk.xls saved

. clear

. capture log close
